File tree 2 files changed +16
-2
lines changed 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 6
6
import sentry_sdk
7
7
from django .conf import settings
8
8
9
+ from sentry import options
9
10
from sentry .monitors .tasks .check_missed import check_missing
10
11
from sentry .monitors .tasks .check_timeout import check_timeout
11
12
from sentry .utils import metrics , redis
@@ -41,8 +42,13 @@ def _dispatch_tick(ts: datetime):
41
42
sentry.io, when we deploy we restart the celery beat worker and it will
42
43
skip any tasks it missed)
43
44
"""
44
- check_missing .delay (current_datetime = ts )
45
- check_timeout .delay (current_datetime = ts )
45
+ if options .get ("crons.use_clock_pulse_consumer" ):
46
+ # TODO(epurkhiser): This should dispatch the pulse as a message on the
47
+ # monitors-clock-pulse topic
48
+ pass
49
+ else :
50
+ check_missing .delay (current_datetime = ts )
51
+ check_timeout .delay (current_datetime = ts )
46
52
47
53
48
54
def try_monitor_clock_tick (ts : datetime , partition : int ):
Original file line number Diff line number Diff line change 1820
1820
# Killswitch for monitor check-ins
1821
1821
register ("crons.organization.disable-check-in" , type = Sequence , default = [])
1822
1822
1823
+ # Controls the method of clock task dispatch. This is part of GH-58410 and will
1824
+ # enable dispatching via the clock pulse consumer instead of using celery tassk
1825
+ register (
1826
+ "crons.use_clock_pulse_consumer" ,
1827
+ default = False ,
1828
+ flags = FLAG_MODIFIABLE_BOOL | FLAG_AUTOMATOR_MODIFIABLE ,
1829
+ )
1830
+
1823
1831
# Turns on and off the running for dynamic sampling collect_orgs.
1824
1832
register ("dynamic-sampling.tasks.collect_orgs" , default = False , flags = FLAG_MODIFIABLE_BOOL )
1825
1833
You can’t perform that action at this time.
0 commit comments