Browse Source

Stop using deprecated BROKER_HOST

Ask Solem 11 years ago
parent
commit
31e4731171
3 changed files with 3 additions and 3 deletions
  1. 1 1
      celery/app/base.py
  2. 1 1
      celery/app/utils.py
  3. 1 1
      celery/tests/app/test_app.py

+ 1 - 1
celery/app/base.py

@@ -318,7 +318,7 @@ class Celery(object):
                    transport_options=None, heartbeat=None, **kwargs):
         conf = self.conf
         return self.amqp.Connection(
-            hostname or conf.BROKER_HOST,
+            hostname or conf.BROKER_URL,
             userid or conf.BROKER_USER,
             password or conf.BROKER_PASSWORD,
             virtual_host or conf.BROKER_VHOST,

+ 1 - 1
celery/app/utils.py

@@ -64,7 +64,7 @@ class Settings(ConfigurationView):
         return self.BROKER_TRANSPORT
 
     @property
-    def BROKER_HOST(self):
+    def BROKER_URL(self):
         return (os.environ.get('CELERY_BROKER_URL') or
                 self.first('BROKER_URL', 'BROKER_HOST'))
 

+ 1 - 1
celery/tests/app/test_app.py

@@ -170,7 +170,7 @@ class test_App(AppCase):
     @with_environ('CELERY_BROKER_URL', '')
     def test_with_broker(self):
         with self.Celery(broker='foo://baribaz') as app:
-            self.assertEqual(app.conf.BROKER_HOST, 'foo://baribaz')
+            self.assertEqual(app.conf.BROKER_URL, 'foo://baribaz')
 
     def test_repr(self):
         self.assertTrue(repr(self.app))