Skip to content
Snippets Groups Projects
Commit 009633c6 authored by Aymeric Chaumont's avatar Aymeric Chaumont
Browse files

added safeguard

parent d0daa357
Branches
No related tags found
1 merge request!49improve cameras
Pipeline #44435 passed
......@@ -75,4 +75,4 @@ async def handle_cameras():
db.add(db_record)
db.commit()
await manager.broadcast(json.dumps({"type": "data"}))
time.sleep(60 - (datetime.now() - current_date).total_seconds())
time.sleep(max(0, 60 - (datetime.now() - current_date).total_seconds()))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment