diff options
author | Dennis Eriksen <d@ennis.no> | 2023-02-01 20:59:42 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-02-01 20:59:42 +0100 |
commit | 7c403ecc8b6bd31f447eb91d73d95055489fbac4 (patch) | |
tree | f70a96871178c0d78be505cc71f090e4e91857ea /scripts/queue_runner.py | |
parent | moving and renaming/breaking everything (diff) | |
download | energyscripts-7c403ecc8b6bd31f447eb91d73d95055489fbac4.tar.gz |
fixing some lintingthings
Diffstat (limited to 'scripts/queue_runner.py')
-rw-r--r-- | scripts/queue_runner.py | 8 |
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) |