Skip to content

Commit d7399d2

Browse files
authored
add run heartbeat keepalive and broadcast logic to cover for missing updates from db (#441)
1 parent ea0bbba commit d7399d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

services/ui_backend_service/api/notify.py

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ async def handle_trigger_msg(self, msg: str):
9595
# Heartbeat watcher for Tasks.
9696
if table.table_name == self.db.task_table_postgres.table_name:
9797
self.event_emitter.emit('task-heartbeat', 'update', data)
98+
# also keepalive for run heartbeats.
99+
self.event_emitter.emit('run-heartbeat', 'update', data)
100+
# also broadcast as a run heartbeat update, as otherwise these receive no updates
101+
await _broadcast(self.event_emitter, "UPDATE", self.db.run_table_postgres.table_name, data)
98102

99103
# Notify when Run parameters are ready.
100104
if operation == "INSERT" and \

0 commit comments

Comments
 (0)