aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-01-29 14:16:40 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2015-01-29 14:16:40 +0100
commit8c8af22b4cea5929a32cf650be6e3f26282cb70a (patch)
tree656620fa0d401dd2648f3805df7914472b62aed2 /app
parentb893c11eb35cf166960887a5a258d3c21a3a665e (diff)
Add more celery config options.
Change-Id: I6bcd4c9af7919b3d21759a0e7cff8a8ffc5ff5fe
Diffstat (limited to 'app')
-rw-r--r--app/taskqueue/celeryconfig.py6
-rw-r--r--app/taskqueue/tasks.py4
2 files changed, 8 insertions, 2 deletions
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.