Skip to content

Commit

Permalink
add run heartbeat keepalive and broadcast logic to cover for missing …
Browse files Browse the repository at this point in the history
…updates from db (#441)
  • Loading branch information
saikonen authored Oct 7, 2024
1 parent ea0bbba commit d7399d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/ui_backend_service/api/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ async def handle_trigger_msg(self, msg: str):
# Heartbeat watcher for Tasks.
if table.table_name == self.db.task_table_postgres.table_name:
self.event_emitter.emit('task-heartbeat', 'update', data)
# also keepalive for run heartbeats.
self.event_emitter.emit('run-heartbeat', 'update', data)
# also broadcast as a run heartbeat update, as otherwise these receive no updates
await _broadcast(self.event_emitter, "UPDATE", self.db.run_table_postgres.table_name, data)

# Notify when Run parameters are ready.
if operation == "INSERT" and \
Expand Down

0 comments on commit d7399d2

Please sign in to comment.