Skip to content
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

Use celery app timezone #1351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

woutdenolf
Copy link

@woutdenolf woutdenolf commented Jan 22, 2024

Closes #1163 #1132

The task started and received times in the task table are derived from the raw celery events which provide times as number of seconds passed since the epoch.

time += '-' + str(capp.conf.timezone)

This code takes timezone into account but not enable_utc.

https://docs.celeryq.dev/en/stable/userguide/configuration.html#time-and-date-settings

Instead of using the time and date settings from the celery configuration directly, this PR proposes to use the timezone provided by the celery app

https://github.com/celery/celery/blob/8f389997887232500d4aa1a2b0ae0c7320c4c84a/celery/app/base.py#L1360

This allows using an explicit timezone (e.g. timezone = "Europe/Paris") or the local timezone (enable_utc = False).

Repository owner deleted a comment Jan 29, 2024
@woutdenolf woutdenolf marked this pull request as ready for review March 28, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Substantial drift from celery worker
1 participant