We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d9464f commit bce92feCopy full SHA for bce92fe
1 file changed
src/groundlight/edge/api.py
@@ -67,14 +67,16 @@ def set_config(
67
"""
68
self._request("PUT", "/edge-config", json=config.to_payload())
69
70
- poll_interval_seconds = 1
71
desired_ids = {d.detector_id for d in config.detectors if d.detector_id}
+ if not desired_ids:
72
+ return self.get_config()
73
+
74
deadline = time.time() + timeout_sec
75
while time.time() < deadline:
76
readiness = self.get_detector_readiness()
- if desired_ids and all(readiness.get(did, False) for did in desired_ids):
77
+ if all(readiness.get(did, False) for did in desired_ids):
78
return self.get_config()
- time.sleep(poll_interval_seconds)
79
+ time.sleep(1)
80
81
raise TimeoutError(
82
f"Edge detectors were not all ready within {timeout_sec}s. "
0 commit comments