aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/queue_runner.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-11-09 14:11:35 +0100
committerDennis Eriksen <d@ennis.no>2023-11-09 14:11:35 +0100
commite8e33997b360bfee461d5939b7c9fef5f3de6e8c (patch)
tree8f61e55c69edbd6abf140aba462bf535c83e1f22 /scripts/queue_runner.py
parentadded new function to get env (diff)
downloadenergyscripts-e8e33997b360bfee461d5939b7c9fef5f3de6e8c.tar.gz
optimize and simplify
- use more fstrings - use exceptions - don't print "oh lol" - drop tempfiles
Diffstat (limited to 'scripts/queue_runner.py')
-rw-r--r--scripts/queue_runner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/queue_runner.py b/scripts/queue_runner.py
index 0fdb80d..35cd97f 100644
--- a/scripts/queue_runner.py
+++ b/scripts/queue_runner.py
@@ -12,7 +12,9 @@ from litequeue import SQLQueue
QUEUE_DB = common.env("el_QUEUE_db", "litequeue.db")
QUEUE_DIR = common.env("el_QUEUE_dir", "queue")
QUEUE_DB = QUEUE_DIR + "/" + QUEUE_DB
-QUEUE_SLEEP = int(common.env("el_QUEUE_sleep", 15)) # Default sleep 15 seconds when queue empty
+QUEUE_SLEEP = int(
+ common.env("el_QUEUE_sleep", 15)
+) # Default sleep 15 seconds when queue empty
# Unlock all
con = sqlite3.connect(QUEUE_DB)