diff options
author | Dennis Eriksen <d@ennis.no> | 2023-11-09 13:57:26 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-11-09 13:57:26 +0100 |
commit | 4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad (patch) | |
tree | d605620535229e741f7e2da473086fe185f78e5f /scripts/common/queue.py | |
parent | small fixes (diff) | |
download | energyscripts-4ad7f2e5111ca9e27dcbe5781c87f249bc7377ad.tar.gz |
added new function to get env
which handles missing env better...
Diffstat (limited to 'scripts/common/queue.py')
-rw-r--r-- | scripts/common/queue.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/common/queue.py b/scripts/common/queue.py index de49802..f67acbb 100644 --- a/scripts/common/queue.py +++ b/scripts/common/queue.py @@ -2,13 +2,14 @@ """ common functions and stuff """ import logging -import os import pickle from litequeue import SQLQueue -QUEUE_DB = os.environ.get("el_QUEUE_db", "litequeue.db") -QUEUE_DIR = os.environ.get("el_QUEUE_dir", "queue") +from . import env + +QUEUE_DB = env("el_QUEUE_db", "litequeue.db") +QUEUE_DIR = env("el_QUEUE_dir", "queue") QUEUE_DB = QUEUE_DIR + "/" + QUEUE_DB |