diff options
Diffstat (limited to 'scripts/queue_runner.py')
-rw-r--r-- | scripts/queue_runner.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/queue_runner.py b/scripts/queue_runner.py index fd88600..0fdb80d 100644 --- a/scripts/queue_runner.py +++ b/scripts/queue_runner.py @@ -1,20 +1,18 @@ #!/usr/bin/env python3 """ move items from queue to database """ -import os import pickle import sqlite3 import time +import common from common.postgres import dbi from litequeue import SQLQueue -QUEUE_DB = os.environ.get("el_QUEUE_db", "litequeue.db") -QUEUE_DIR = os.environ.get("el_QUEUE_dir", "queue") +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( - os.environ.get("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) |