Skip to content

Commit bc5d81e

Browse files
authored
Update Celery config to use UTC time (#2080)
* 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...
1 parent 66d72b5 commit bc5d81e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/celery/celery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def init_app(self, app):
4848
"beat_schedule": app.config["CELERYBEAT_SCHEDULE"],
4949
"imports": app.config["CELERY_IMPORTS"],
5050
"task_serializer": app.config["CELERY_TASK_SERIALIZER"],
51+
"enable_utc": app.config["CELERY_ENABLE_UTC"],
5152
"timezone": app.config["CELERY_TIMEZONE"],
5253
"broker_transport_options": app.config["BROKER_TRANSPORT_OPTIONS"],
5354
"task_queues": app.config["CELERY_QUEUES"],

app/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class Config(object):
359359
"queue_name_prefix": NOTIFICATION_QUEUE_PREFIX,
360360
}
361361
CELERY_ENABLE_UTC = True
362-
CELERY_TIMEZONE = os.getenv("TIMEZONE", "America/Toronto")
362+
CELERY_TIMEZONE = os.getenv("TIMEZONE", "UTC")
363363
CELERY_ACCEPT_CONTENT = ["json"]
364364
CELERY_TASK_SERIALIZER = "json"
365365
CELERY_IMPORTS = (

0 commit comments

Comments
 (0)