Skip to content

Commit 9543214

Browse files
committed
controller procedure monitor stuck uses heartbeat
1 parent 7fdea0b commit 9543214

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

configs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ controller_procedures:
3131
monitors_stuck:
3232
schedule: "*/5 * * * *"
3333
params:
34-
time_tolerance: 300
34+
time_tolerance: 10
3535

3636
executor_concurrency: 5
3737
executor_sleep: 5

resources/kubernetes_template/config_map.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ data:
4242
monitors_stuck:
4343
schedule: "*/5 * * * *"
4444
params:
45-
time_tolerance: 300
45+
time_tolerance: 10
4646
4747
executor_concurrency: 5
4848
executor_sleep: 5
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
with monitors as (
22
select
33
id,
4-
extract(epoch from current_timestamp - greatest(queued_at, running_at)) :: int as seconds_queued
4+
extract(epoch from current_timestamp - last_heartbeat) :: int as time_since_last_heartbeat
55
from "Monitors"
66
where
77
enabled and (queued or running)
88
)
99
select id
1010
from monitors
11-
where seconds_queued > $1 :: int;
11+
where time_since_last_heartbeat > $1 :: int;

0 commit comments

Comments
 (0)