diff --git a/config.py b/config.py index ae13709..0f36539 100644 --- a/config.py +++ b/config.py @@ -24,8 +24,8 @@ def load_env(): os.environ[value] = f.readline().strip() else: env_value = os.environ.get(key, None) - if env_value is None: - raise Exception(f"Environment variable {key} is empty") + # if env_value is None: + # raise Exception(f"Environment variable {key} is empty") os.environ[value] = env_value diff --git a/handler.py b/handler.py index 5de8c71..bf8f11b 100644 --- a/handler.py +++ b/handler.py @@ -44,7 +44,7 @@ def _get_payload(event: any): def handle(event: any, context=None): - start = time.time() + # start = time.time() payload = validate(EventValidator(), _get_payload(event)) result = None @@ -280,20 +280,20 @@ def handle(event: any, context=None): result = dict(error=f'The action {payload["action"]} was not found') http_code_response = 400 - end = time.time() - total = end - start + # end = time.time() + # total = end - start - data = { - "result": result, - "timestamp": total, - } + # data = { + # "result": result, + # "timestamp": total, + # } return ( - data + result if context is None else ( context.status(http_code_response) .headers({"Content-Type": "application/json"}) - .success(data) + .success(result) ) ) diff --git a/requirements.txt b/requirements.txt index 6d902d8..d2d5cfd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -hyperon-das-atomdb==0.1.7 +hyperon-das-atomdb~=0.2 incoming==0.3.1 \ No newline at end of file