← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~rvb/maas/add-broker-url-to-local-celerysettings into lp:maas

 

Raphaël Badin has proposed merging lp:~rvb/maas/add-broker-url-to-local-celerysettings into lp:maas.

Commit message:
Add an empty local celery config file in contrib/.  That file will be populated by the packaging.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~rvb/maas/add-broker-url-to-local-celerysettings/+merge/125473

This branch adds a local celery settings file (in contrib/) with an empty BROKER_URL in it.  That file (similarly to what we do with contrib/maas_local_settings.py) will be edited by the package with a real BROKER_URL.

= Pre-imp =

This was discussed with Julian.

= Notes =

I've renamed the local setting file to better illustrate what this file is for.

Note that I've tested that if BROKER_URL is not changed by the packaging and stays as '', then the default BROKER_URL will be used ('amqp://guest:guest@localhost:5672//').  This is only to ensure that this whole change does not break the package even when half-finished.
-- 
https://code.launchpad.net/~rvb/maas/add-broker-url-to-local-celerysettings/+merge/125473
Your team MAAS Maintainers is requested to review the proposed merge of lp:~rvb/maas/add-broker-url-to-local-celerysettings into lp:maas.
=== added file 'contrib/maas_local_celeryconfig.py'
--- contrib/maas_local_celeryconfig.py	1970-01-01 00:00:00 +0000
+++ contrib/maas_local_celeryconfig.py	2012-09-20 12:59:23 +0000
@@ -0,0 +1,3 @@
+# Broken connection information.
+# Format: transport://userid:password@hostname:port/virtual_host
+BROKER_URL = ''

=== modified file 'etc/celeryconfig.py'
--- etc/celeryconfig.py	2012-09-17 10:10:46 +0000
+++ etc/celeryconfig.py	2012-09-20 12:59:23 +0000
@@ -4,7 +4,7 @@
 """Celery settings for the maas project.
 
 Do not edit this file.  Instead, put custom settings in a module named
-user_maasceleryconfig.py somewhere on the PYTHONPATH.
+maas_local_celeryconfig.py somewhere on the PYTHONPATH.
 """
 
 from __future__ import (
@@ -45,11 +45,11 @@
 BROKER_URL = 'amqp://guest:guest@localhost:5672//'
 
 try:
-    import user_maasceleryconfig
+    import maas_local_celeryconfig
 except ImportError:
     pass
 else:
-    import_settings(user_maasceleryconfig)
+    import_settings(maas_local_celeryconfig)
 
 
 CELERY_IMPORTS = (