Skip to content

Commit

Permalink
Automated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vpetersson committed Mar 15, 2023
1 parent 168bff3 commit 11024e2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions automated_quality_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"Content-Type": "application/json",
}
SCREEN_SYNC_THRESHOLD = 60 * 5 # 5 minutes
PLAYLIST_PREFIX = 'QC'
PLAYLIST_PREFIX = "QC"


def get_ten_random_assets():
"""
Expand Down Expand Up @@ -58,17 +59,15 @@ def ensure_screen_in_sync(screen_id):
)
response.raise_for_status()

if response.json()['ws_open'] == False:
if response.json()["ws_open"] == False:
print(f"Screen {screen_id} doesn't have an active WebSocket connection.")

if response.json()['status'] == 'Offline':
if response.json()["status"] == "Offline":
print(f"Screen {screen_id} is offline.")
else:
assert response.json()["in_sync"] == True




@retry(AssertionError, tries=10, delay=SCREEN_SYNC_THRESHOLD / 10)
def wait_for_screens_to_sync():
"""
Expand Down

0 comments on commit 11024e2

Please sign in to comment.