aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/queue_runner.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-02-01 20:59:42 +0100
committerDennis Eriksen <d@ennis.no>2023-02-01 20:59:42 +0100
commit7c403ecc8b6bd31f447eb91d73d95055489fbac4 (patch)
treef70a96871178c0d78be505cc71f090e4e91857ea /scripts/queue_runner.py
parentmoving and renaming/breaking everything (diff)
downloadenergyscripts-7c403ecc8b6bd31f447eb91d73d95055489fbac4.tar.gz
fixing some lintingthings
Diffstat (limited to 'scripts/queue_runner.py')
-rw-r--r--scripts/queue_runner.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/queue_runner.py b/scripts/queue_runner.py
index 436dcb8..fd4812e 100644
--- a/scripts/queue_runner.py
+++ b/scripts/queue_runner.py
@@ -19,7 +19,7 @@ con.commit()
con.close()
# Open Queue
-q = SQLQueue(QUEUE_DB, maxsize=None)
+q = SQLQueue(QUEUE_DB, maxsize=None)
q.prune()
msgids = []
@@ -30,7 +30,7 @@ i = 0
# Event loop
while True:
# Just sleep if queue is empty
- if q.empty() == True:
+ if q.empty() is True:
time.sleep(10)
continue
@@ -59,8 +59,8 @@ while True:
dbi(sql,values)
- for id in msgids:
- q.done(id)
+ for msgid in msgids:
+ q.done(msgid)
table = sql.split(' ')[2]
num = 1 if isinstance(values, tuple) else len(values)