Skip to content

Commit

Permalink
Update Celery config to use UTC time (#2080)
Browse files Browse the repository at this point in the history
* Add a retry mechanism when fetching email attachements

* Remove unnecessary exception handling specificity

* Revert bad commit

* Enable/use UTC not local time in celery and beat conf

* Fix bad commit...
  • Loading branch information
whabanks authored Jan 22, 2024
1 parent 66d72b5 commit bc5d81e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/celery/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def init_app(self, app):
"beat_schedule": app.config["CELERYBEAT_SCHEDULE"],
"imports": app.config["CELERY_IMPORTS"],
"task_serializer": app.config["CELERY_TASK_SERIALIZER"],
"enable_utc": app.config["CELERY_ENABLE_UTC"],
"timezone": app.config["CELERY_TIMEZONE"],
"broker_transport_options": app.config["BROKER_TRANSPORT_OPTIONS"],
"task_queues": app.config["CELERY_QUEUES"],
Expand Down
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class Config(object):
"queue_name_prefix": NOTIFICATION_QUEUE_PREFIX,
}
CELERY_ENABLE_UTC = True
CELERY_TIMEZONE = os.getenv("TIMEZONE", "America/Toronto")
CELERY_TIMEZONE = os.getenv("TIMEZONE", "UTC")
CELERY_ACCEPT_CONTENT = ["json"]
CELERY_TASK_SERIALIZER = "json"
CELERY_IMPORTS = (
Expand Down

0 comments on commit bc5d81e

Please sign in to comment.