Skip to content

Sub minute intervals for Celery Cron integrations #2168

@antonpirker

Description

@antonpirker

We do NOT support sub minute intervals in Sentry Crons. There when where would be "interval" type schedule that is sub minute, we should print a warning and return an empty monitor config:

See code here:
[_get_monitor_confi](

elif isinstance(celery_schedule, schedule):
schedule_type = "interval"
(schedule_value, schedule_unit) = _get_humanized_interval(
celery_schedule.seconds
)
else:
logger.warning(
"Celery schedule type '%s' not supported by Sentry Crons.",
type(celery_schedule),
)
return {}
)

In the elif there should be warning and a return {} like in the else below in case the interval is under a minute.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions