Browse Source

Fixed some broken tests

Ask Solem 14 years ago
parent
commit
5c2f636a76
4 changed files with 3 additions and 8 deletions
  1. 1 1
      celery/apps/beat.py
  2. 0 5
      celery/backends/amqp.py
  3. 1 1
      celery/task/base.py
  4. 1 1
      celery/tests/test_bin/test_celeryd.py

+ 1 - 1
celery/apps/beat.py

@@ -37,7 +37,7 @@ class Beat(object):
         self.scheduler_cls = scheduler_cls or app.conf.CELERYBEAT_SCHEDULER
         self.max_interval = max_interval
         self.socket_timeout = socket_timeout
-        self.colored = term.colored(enabled=defaults.CELERYD_LOG_COLOR)
+        self.colored = term.colored(enabled=app.conf.CELERYD_LOG_COLOR)
 
         if not isinstance(self.loglevel, int):
             self.loglevel = LOG_LEVELS[self.loglevel.upper()]

+ 0 - 5
celery/backends/amqp.py

@@ -18,11 +18,6 @@ class AMQResultWarning(UserWarning):
 
 
 class ResultPublisher(Publisher):
-    exchange = conf.RESULT_EXCHANGE
-    exchange_type = conf.RESULT_EXCHANGE_TYPE
-    delivery_mode = conf.RESULT_PERSISTENT and 2 or 1
-    serializer = conf.RESULT_SERIALIZER
-    durable = conf.RESULT_PERSISTENT
     auto_delete = True
 
     def __init__(self, connection, task_id, **kwargs):

+ 1 - 1
celery/task/base.py

@@ -439,7 +439,7 @@ class BaseTask(object):
         options = router.route(options, self.name, args, kwargs)
         exchange = options.get("exchange")
         exchange_type = options.get("exchange_type")
-        expires = expires or task.expires
+        expires = expires or self.expires
 
         publish = publisher or self.get_publisher(connection,
                                                   exchange=exchange,

+ 1 - 1
celery/tests/test_bin/test_celeryd.py

@@ -40,7 +40,7 @@ def disable_stdouts(fun):
 class _WorkController(object):
 
     def __init__(self, *args, **kwargs):
-        self.logger = log.get_default_logger()
+        self.logger = app_or_default().log.get_default_logger()
 
     def start(self):
         pass