From d86413ad81135454df7ef1c7d7faeb52eb51efa8 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Wed, 1 Feb 2023 12:24:22 +0100 Subject: adding some common stuff, less code replica --- common/__init__.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 common/__init__.py (limited to 'common/__init__.py') 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 -- cgit v1.2.3