diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d327a4a..abbaa44 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,8 +15,8 @@ - - + + @@ -201,7 +201,7 @@ - + @@ -287,8 +287,8 @@ - - + + diff --git a/index.py b/index.py index 817fe92..06d4f21 100644 --- a/index.py +++ b/index.py @@ -52,5 +52,7 @@ while True: poll() doc_conf = db.collection('configurations').document(os.getenv('CONFIG_CODE')).get().to_dict() print(doc_conf) + if doc_conf['stop']: + break poll_time = float(doc_conf['frequency']) time.sleep(poll_time - ((time.time() - start_time) % poll_time))