Skip to content

Commit

Permalink
ref(rules): Fix task name for delayed rule processing (#70831)
Browse files Browse the repository at this point in the history
The task for processing delayed rules wasn't imported into
`CELERY_IMPORTS` and the name was incorrect - this fixes both and adds a
log message if the buffer hook registry isn't working as expected.
  • Loading branch information
ceorourke committed May 14, 2024
1 parent f18e50d commit c7c3256
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/sentry/buffer/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def callback(self, buffer_hook_event: BufferHookEvent, data: RedisBuffer) -> boo
try:
callback = self._registry[buffer_hook_event]
except KeyError:
logger.info("buffer_hook_event.missing", extra={"key_name": buffer_hook_event.value})
return False

return callback(data)
Expand Down
1 change: 1 addition & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
"sentry.tasks.user_report",
"sentry.profiles.task",
"sentry.release_health.tasks",
"sentry.rules.processing.delayed_processing",
"sentry.dynamic_sampling.tasks.boost_low_volume_projects",
"sentry.dynamic_sampling.tasks.boost_low_volume_transactions",
"sentry.dynamic_sampling.tasks.recalibrate_orgs",
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/rules/processing/delayed_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def process_delayed_alert_conditions(buffer: RedisBuffer) -> None:


@instrumented_task(
name="sentry.delayed_processing.tasks.apply_delayed",
name="sentry.rules.processing.delayed_processing",
queue="delayed_rules",
default_retry_delay=5,
max_retries=5,
Expand Down

0 comments on commit c7c3256

Please sign in to comment.