We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 886b8d4 commit 6c31564Copy full SHA for 6c31564
scratchattach/eventhandlers/cloud_events.py
@@ -53,7 +53,15 @@ def _updater(self):
53
except Exception:
54
print("CloudEvents: Disconnected. Reconnecting ...", time.time())
55
time.sleep(0.1) # cooldown
56
- self.source_cloud.connect()
+ while True:
57
+ try:
58
+ self.source_cloud.connect()
59
+ except Exception:
60
+ print("CloudEvents: Reconnecting failed, trying again in 10 seconds.", time.time())
61
+ time.sleep(10)
62
+ else:
63
+ break
64
+
65
print("CloudEvents: Reconnected.", time.time())
66
self.call_event("on_reconnect", [])
67
0 commit comments