some improvements
This commit is contained in:
18
db/README.md
18
db/README.md
@@ -17,4 +17,20 @@
|
||||
### tstamp is the exact Date at the first ever creation of the db entry and does not say anything about completion or rejection.
|
||||
|
||||
## NOTE:
|
||||
### A created command is marked as failed after 5 minutes if its status is still pending, to ensure that no processes continue after a communication failure in the chain.
|
||||
### A created command is marked as failed after 5 minutes if its status is still pending, to ensure that no processes continue after a communication failure in the chain.
|
||||
|
||||
|
||||
# COFFEE DB description
|
||||
|
||||
## one command contains:
|
||||
- user
|
||||
- status
|
||||
- tstamp
|
||||
|
||||
### user may contain a string about the user that started the coffee making process
|
||||
|
||||
### status may contain one out of following strings:
|
||||
```["pending","failed","served","rejected"]```
|
||||
|
||||
## NOTE
|
||||
### A Coffee making process is going through a command creation in the backend, therefore a coffee status can be rejected by the esp or fail after 5 minutes. If the according command fails the coffee fails.
|
||||
BIN
db/coffee.db
BIN
db/coffee.db
Binary file not shown.
@@ -13,7 +13,7 @@ cursor = conn.cursor()
|
||||
|
||||
# Tabelle erstellen mit entsprechenden Atributen
|
||||
cursor.execute("""
|
||||
CREATE TABLE IF NOT EXISTS commands (
|
||||
CREATE TABLE IF NOT EXISTS coffee (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user TEXT NOT NULL,
|
||||
status TEXT NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user