Skip to content

Commit

Permalink
fix: query heartbeats db once (#6854)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexledesma committed Mar 1, 2022
1 parent 5b10719 commit 6092f3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python_modules/dagster/dagster/daemon/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ def get_daemon_statuses(
)

daemon_statuses_by_type = {}
heartbeats = instance.get_daemon_heartbeats()

for daemon_type in daemon_types:
# check if daemon is not required
Expand All @@ -371,7 +372,6 @@ def get_daemon_statuses(
)
else:
# check if daemon has a heartbeat
heartbeats = instance.get_daemon_heartbeats()
if daemon_type not in heartbeats:
daemon_statuses_by_type[daemon_type] = DaemonStatus(
daemon_type=daemon_type, required=True, healthy=False, last_heartbeat=None
Expand Down

0 comments on commit 6092f3e

Please sign in to comment.