-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crons django-celery-beat timezone glitch #2472
Comments
Hey @avilaton ! |
@antonpirker I've seen a number of reports about this actually. Let's see if we can't get this more heavily prioritized? |
@evanpurkhiser I can take a look at this next week. |
@evanpurkhiser the list of timezones in When I select a timezone that is not available in Sentry's list, then the timezone |
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.29.2
Steps to Reproduce
The current implementation of the
_get_monitor_config
helper does not consider for the posibility that the schedule might be coming from django_celery_beat (this is understandable since this is all new).Here is the implementation for it
https://django-celery-beat.readthedocs.io/en/latest/_modules/django_celery_beat/tzcrontab.html#TzAwareCrontab
which has a timezone property. The resulting schedule could have a different timezone from app.conf.timezone and could be per-schedule.
We traced it to here https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/integrations/celery.py#L447 and think that considering that schedule could be an instance of TzAwareCrontab would be the way to go.
Not sure how you would like to code the possible import failure of django_celery_beat and so on, so stopped there.
Expected Result
Expectation is that the cron monitor in sentry has the Americas/Chicago timezone we have setup in django admin for our task
Actual Result
The task cron monitor in sentry has Americas/Los_Angeles as timezone as that is the app.conf.timezone
The text was updated successfully, but these errors were encountered: