aboutsummaryrefslogtreecommitdiffstats
path: root/common/__init__.py
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2023-02-01 12:24:22 +0100
committerDennis Eriksen <d@ennis.no>2023-02-01 12:24:22 +0100
commitd86413ad81135454df7ef1c7d7faeb52eb51efa8 (patch)
treefaf9e7cc5bc728065f4d87f86db7c8b190ba42ed /common/__init__.py
parentuse new db thingy (diff)
downloadenergyscripts-d86413ad81135454df7ef1c7d7faeb52eb51efa8.tar.gz
adding some common stuff, less code replica
Diffstat (limited to 'common/__init__.py')
-rw-r--r--common/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/__init__.py b/common/__init__.py
new file mode 100644
index 0000000..89977d2
--- /dev/null
+++ b/common/__init__.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+''' common functions and stuff '''
+
+import os
+
+
+QUEUE = bool(os.environ.get('el_QUEUE', False))
+
+# Initialize queue
+if QUEUE is True:
+ from .queue import dbi
+else:
+ from .postgres import dbi