diff options
author | Dennis Eriksen <d@ennis.no> | 2023-02-01 12:24:22 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-02-01 12:24:22 +0100 |
commit | d86413ad81135454df7ef1c7d7faeb52eb51efa8 (patch) | |
tree | faf9e7cc5bc728065f4d87f86db7c8b190ba42ed /common/__init__.py | |
parent | use new db thingy (diff) | |
download | energyscripts-d86413ad81135454df7ef1c7d7faeb52eb51efa8.tar.gz |
adding some common stuff, less code replica
Diffstat (limited to 'common/__init__.py')
-rw-r--r-- | common/__init__.py | 13 |
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 |