From 8c8af22b4cea5929a32cf650be6e3f26282cb70a Mon Sep 17 00:00:00 2001 From: Milo Casagrande Date: Thu, 29 Jan 2015 14:16:40 +0100 Subject: Add more celery config options. Change-Id: I6bcd4c9af7919b3d21759a0e7cff8a8ffc5ff5fe --- app/taskqueue/celeryconfig.py | 6 ++++++ app/taskqueue/tasks.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/taskqueue/celeryconfig.py b/app/taskqueue/celeryconfig.py index 9624262..177393e 100644 --- a/app/taskqueue/celeryconfig.py +++ b/app/taskqueue/celeryconfig.py @@ -17,9 +17,15 @@ BROKER_URL = "redis://localhost" BROKER_POOL_LIMIT = 20 +BROKER_TRANSPORT_OPTIONS = { + "visibility_timeout": 10800, + "fanout_prefix": True, + "fanout_patterns": True +} CELERY_ACCEPT_CONTENT = ["json"] CELERY_RESULT_SERIALIZER = "json" CELERY_TASK_SERIALIZER = "json" +CELERY_TIMEZONE = "UTC" CELERY_ENABLE_UTC = True CELERY_DISABLE_RATE_LIMITS = True CELERY_RESULT_BACKEND = "mongodb://localhost" diff --git a/app/taskqueue/tasks.py b/app/taskqueue/tasks.py index 8b47b42..3f70373 100644 --- a/app/taskqueue/tasks.py +++ b/app/taskqueue/tasks.py @@ -118,7 +118,7 @@ def defconfig_bisect(doc_id, db_options, fields=None): return utils.bisect.execute_defconfig_bisection(doc_id, db_options, fields) -@taskc.app.task(name="schedule-boot-report") +@taskc.app.task(name="schedule-boot-report", acks_late=True, track_started=True) def schedule_boot_report(json_obj, db_options, mail_options, countdown): """Schedule a second task to send the boot report. @@ -164,7 +164,7 @@ def schedule_boot_report(json_obj, db_options, mail_options, countdown): "cannot be sent", job, kernel) -@taskc.app.task(name="send-boot-report") +@taskc.app.task(name="send-boot-report", acks_late=True, track_started=True) def send_boot_report(job, kernel, lab_name, to_addrs, db_options, mail_options): """Create the boot report email and send it. -- cgit v1.2.3