← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~adeuring/launchpad/jobrunner-celery-config-update into lp:launchpad

 

Abel Deuring has proposed merging lp:~adeuring/launchpad/jobrunner-celery-config-update into lp:launchpad.

Requested reviews:
  Abel Deuring (adeuring): code

For more details, see:
https://code.launchpad.net/~adeuring/launchpad/jobrunner-celery-config-update/+merge/105310

simple config changes to finally use lazr.jobrunner
-- 
https://code.launchpad.net/~adeuring/launchpad/jobrunner-celery-config-update/+merge/105310
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== modified file 'buildout.cfg'
--- buildout.cfg	2012-03-22 19:17:45 +0000
+++ buildout.cfg	2012-05-10 10:33:21 +0000
@@ -71,6 +71,7 @@
     pyinotify
     lpjsmin
     jsautobuild
+    lazr.jobrunner
 # XXX gary 2009-5-12 bug 375751:
 # Make mailman built and installed in a more normal way.
 extra-paths =

=== modified file 'lib/lp/services/job/celeryconfig.py'
--- lib/lp/services/job/celeryconfig.py	2012-04-18 16:23:23 +0000
+++ lib/lp/services/job/celeryconfig.py	2012-05-10 10:33:21 +0000
@@ -79,6 +79,14 @@
     result['CELERY_IMPORTS'] = ("lp.services.job.celeryjob", )
     result['CELERY_QUEUES'] = celery_queues
     result['CELERY_RESULT_BACKEND'] = 'amqp'
+    # See http://ask.github.com/celery/userguide/optimizing.html:
+    # The AMQP message of a job should stay in the RabbitMQ server
+    # until the job has been finished. This allows to simply kill
+    # a celeryd instance while a job is executed; when another
+    # instance is started later, it will run the aborted job again.
+    result['CELERYD_PREFETCH_MULTIPLIER'] = 1
+    result['CELERY_ACKS_LATE'] = True
+
     return result
 
 try:

=== modified file 'versions.cfg'
--- versions.cfg	2012-04-30 08:14:06 +0000
+++ versions.cfg	2012-05-10 10:33:21 +0000
@@ -42,7 +42,7 @@
 lazr.config = 1.1.3
 lazr.delegates = 1.2.0
 lazr.enum = 1.1.3
-lazr.jobrunner = 0.3
+lazr.jobrunner = 0.4
 lazr.lifecycle = 1.1
 lazr.restful = 0.19.6
 lazr.restfulclient = 0.12.2


Follow ups