Pārlūkot izejas kodu

Changing the `BROKER_BACKEND_EXTRA_ARGS ` config option to `BROKER_TRANSPORT_OPTIONS`.

Ryan Petrello 14 gadi atpakaļ
vecāks
revīzija
443751b84c
2 mainītis faili ar 5 papildinājumiem un 8 dzēšanām
  1. 1 4
      celery/app/base.py
  2. 4 4
      celery/tests/test_app/test_app.py

+ 1 - 4
celery/app/base.py

@@ -153,9 +153,6 @@ class BaseApp(object):
             :setting:`BROKER_CONNECTION_TIMEOUT` setting.
         :keyword backend_cls: defaults to the :setting:`BROKER_BACKEND`
             setting.
-        :keyword backend_extra_args: A dict of additional connection arguments to pass to
-        alternate kombu channel implementations (useful for things like SQLAlchemy
-        engine arguments)            
 
         :returns :class:`kombu.connection.BrokerConnection`:
 
@@ -171,7 +168,7 @@ class BaseApp(object):
                     ssl=self.either("BROKER_USE_SSL", ssl),
                     connect_timeout=self.either(
                                 "BROKER_CONNECTION_TIMEOUT", connect_timeout),
-                    backend_extra_args=self.conf.BROKER_BACKEND_EXTRA_ARGS)
+                    transport_options=self.conf.BROKER_TRANSPORT_OPTIONS)
 
     def with_default_connection(self, fun):
         """With any function accepting `connection` and `connect_timeout`

+ 4 - 4
celery/tests/test_app/test_app.py

@@ -119,15 +119,15 @@ class test_App(unittest.TestCase):
         self.app.config_from_object(Object(CELERY_BACKEND="set_by_us"))
         self.assertEqual(self.app.conf.CELERY_RESULT_BACKEND, "set_by_us")
         
-    def test_setting_BROKER_BACKEND_EXTRA_ARGS(self):
+    def test_setting_BROKER_TRANSPORT_OPTIONS(self):
 
         _args = {'foo': 'bar', 'spam': 'baz'}
 
         self.app.config_from_object(Object())
-        self.assertEqual(self.app.conf.BROKER_BACKEND_EXTRA_ARGS, {})
+        self.assertEqual(self.app.conf.BROKER_TRANSPORT_OPTIONS, {})
 
-        self.app.config_from_object(Object(BROKER_BACKEND_EXTRA_ARGS=_args))
-        self.assertEqual(self.app.conf.BROKER_BACKEND_EXTRA_ARGS, _args)        
+        self.app.config_from_object(Object(BROKER_TRANSPORT_OPTIONS=_args))
+        self.assertEqual(self.app.conf.BROKER_TRANSPORT_OPTIONS, _args)        
 
     def test_Windows_log_color_disabled(self):
         self.app.IS_WINDOWS = True