diff --git a/code/main.py b/code/main.py index da1a6be..81bf7e7 100644 --- a/code/main.py +++ b/code/main.py @@ -1,11 +1,11 @@ import time import logging -import time import os from initialise_app import initialise_app from bandwidth import measure as measure_bandwidth from database import connect + def event(): logging.info('started event') # get env vars @@ -35,6 +35,7 @@ def event(): time.sleep(1) logging.info('finished event') + if __name__ == '__main__': initialise_app() trigger_time = time.time() @@ -48,4 +49,3 @@ if __name__ == '__main__': except Exception as e: logging.error(e) time.sleep(1) -