← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~julian-edwards/maas/celery-basics into lp:maas

 

Julian Edwards has proposed merging lp:~julian-edwards/maas/celery-basics into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~julian-edwards/maas/celery-basics/+merge/106315

Add a celeryconfig and a stub tasks.py for the provisioning server.

The celery worker can be started up with:
PYTHONPATH=`pwd`/src/maas:`pwd`/src celeryd
for now but we need to make this play nicer with buildout.
-- 
https://code.launchpad.net/~julian-edwards/maas/celery-basics/+merge/106315
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/maas/celery-basics into lp:maas.
=== added file 'src/maas/celeryconfig.py'
--- src/maas/celeryconfig.py	1970-01-01 00:00:00 +0000
+++ src/maas/celeryconfig.py	2012-05-18 06:50:23 +0000
@@ -0,0 +1,27 @@
+# Copyright 2012 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Django settings for maas project."""
+
+from __future__ import (
+    absolute_import,
+    print_function,
+    unicode_literals,
+)
+
+__metaclass__ = type
+
+# Do not edit this file, instead put custom settings in
+# user_celeryconfig.py somewhere on the PYTHONPATH.
+
+try:
+    import user_celeryconfig
+except ImportError:
+    pass
+
+
+CELERY_IMPORTS = (
+    "provisioningserver.tasks",
+)
+
+CELERY_ACKS_LATE = True

=== added file 'src/provisioningserver/tasks.py'
--- src/provisioningserver/tasks.py	1970-01-01 00:00:00 +0000
+++ src/provisioningserver/tasks.py	2012-05-18 06:50:23 +0000
@@ -0,0 +1,13 @@
+# Copyright 2012 Canonical Ltd.  This software is licensed under the
+# GNU Affero General Public License version 3 (see the file LICENSE).
+
+"""Provisioning server tasks that are run in Celery workers."""
+
+from __future__ import (
+    absolute_import,
+    print_function,
+    unicode_literals,
+    )
+
+__metaclass__ = type
+__all__ = []


Follow ups