Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -344,9 +344,9 @@ def image_to_video():
|
|
344 |
break
|
345 |
|
346 |
# Send a ping if PING_INTERVAL has passed
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
|
351 |
# Fetch the history of the workflow
|
352 |
history = get_history(prompt_id, token).get(prompt_id, {})
|
|
|
344 |
break
|
345 |
|
346 |
# Send a ping if PING_INTERVAL has passed
|
347 |
+
if time.time() - last_ping > PING_INTERVAL:
|
348 |
+
ws.send('ping')
|
349 |
+
last_ping = time.time()
|
350 |
|
351 |
# Fetch the history of the workflow
|
352 |
history = get_history(prompt_id, token).get(prompt_id, {})
|