Skip to content

Commit 92a8b30

Browse files
ref(crons): Remove temp_task_dispatcher (#54768)
This is no longer needed once tasks are correctly being dispatched by the monitor consumer clock
1 parent 296c063 commit 92a8b30

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/sentry/conf/server.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -971,12 +971,6 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
971971
"schedule": crontab(minute="*/1"),
972972
"options": {"expires": 60},
973973
},
974-
"monitors-temp-task-dispatcher": {
975-
"task": "sentry.monitors.tasks.temp_task_dispatcher",
976-
# Run every 1 minute
977-
"schedule": crontab(minute="*/1"),
978-
"options": {"expires": 60},
979-
},
980974
"clear-expired-snoozes": {
981975
"task": "sentry.tasks.clear_expired_snoozes",
982976
# Run every 5 minutes

src/sentry/monitors/tasks.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from django.conf import settings
99
from django.utils import timezone
1010

11-
from sentry import options
1211
from sentry.constants import ObjectStatus
1312
from sentry.monitors.types import ClockPulseMessage
1413
from sentry.silo import SiloMode
@@ -81,9 +80,6 @@ def _dispatch_tasks(ts: datetime):
8180
sentry.io, when we deploy we restart the celery beat worker and it will
8281
skip any tasks it missed)
8382
"""
84-
if not options.get("monitors.use_consumer_clock_task_triggers"):
85-
return
86-
8783
check_missing.delay(current_datetime=ts)
8884
check_timeout.delay(current_datetime=ts)
8985

@@ -170,19 +166,6 @@ def clock_pulse(current_datetime=None):
170166
_checkin_producer.produce(Topic(settings.KAFKA_INGEST_MONITORS), payload)
171167

172168

173-
@instrumented_task(name="sentry.monitors.tasks.temp_task_dispatcher", silo_mode=SiloMode.REGION)
174-
def temp_task_dispatcher():
175-
"""
176-
Temporary task used to dispatch the monitor tasks. This is used to allow
177-
for a clean switchover to the consumer driven clock pulse.
178-
"""
179-
if options.get("monitors.use_consumer_clock_task_triggers"):
180-
return
181-
182-
check_missing.delay()
183-
check_timeout.delay()
184-
185-
186169
@instrumented_task(
187170
name="sentry.monitors.tasks.check_missing",
188171
time_limit=15,

0 commit comments

Comments
 (0)