aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-07-11 10:24:19 +0200
committerDennis Eriksen <d@ennis.no>2023-07-11 10:24:19 +0200
commitbf3df41f4bf914ae8a800f598dd4a9479e674f13 (patch)
tree5b66fabdce5cbbe5b898c1fbad2b1a4d6fb0ac86 /scripts
parentupdating some requirements, adding req-file for systems without the pkg crypt... (diff)
downloadenergyscripts-bf3df41f4bf914ae8a800f598dd4a9479e674f13.tar.gz
new systemd-service with some protections
Diffstat (limited to 'scripts')
-rw-r--r--scripts/common/queue.py5
-rw-r--r--scripts/queue_runner.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/scripts/common/queue.py b/scripts/common/queue.py
index b4fa369..35abeaa 100644
--- a/scripts/common/queue.py
+++ b/scripts/common/queue.py
@@ -6,7 +6,10 @@ import pickle
import logging
from litequeue import SQLQueue
-QUEUE_DB = os.environ.get('el_QUEUE_db', 'litequeue.db')
+QUEUE_DB = os.environ.get('el_QUEUE_db', 'litequeue.db')
+QUEUE_DIR = os.environ.get('el_QUEUE_dir', 'queue')
+
+QUEUE_DB = QUEUE_DIR + "/" + QUEUE_DB
log = logging.getLogger(__name__)
diff --git a/scripts/queue_runner.py b/scripts/queue_runner.py
index fad223d..0264d83 100644
--- a/scripts/queue_runner.py
+++ b/scripts/queue_runner.py
@@ -10,6 +10,8 @@ from litequeue import SQLQueue
from common.postgres import dbi
QUEUE_DB = os.environ.get('el_QUEUE_db', 'litequeue.db')
+QUEUE_DIR = os.environ.get('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
# Unlock all