Browse Source

fixes broken merge

Ask Solem 12 years ago
parent
commit
d14fd23152
5 changed files with 7 additions and 11 deletions
  1. 1 1
      celery/canvas.py
  2. 2 1
      celery/contrib/migrate.py
  3. 1 1
      celery/fixups/django.py
  4. 1 6
      celery/platforms.py
  5. 2 2
      celery/worker/consumer.py

+ 1 - 1
celery/canvas.py

@@ -282,7 +282,7 @@ class chain(Signature):
 
     def __init__(self, *tasks, **options):
         tasks = (regen(tasks[0]) if len(tasks) == 1 and is_list(tasks[0])
-                else tasks)
+                 else tasks)
         Signature.__init__(
             self, 'celery.chain', (), {'tasks': tasks}, **options
         )

+ 2 - 1
celery/contrib/migrate.py

@@ -242,7 +242,8 @@ def start_filter(app, conn, filter, limit=None, timeout=1.0,
                  consume_from=None, state=None, **kwargs):
     state = state or State()
     queues = prepare_queues(queues)
-    consume_from = [_maybe_queue(app, q) for q in consume_from or queues.keys()]
+    consume_from = [_maybe_queue(app, q)
+                    for q in consume_from or queues.keys()]
     if isinstance(tasks, string_t):
         tasks = set(tasks.split(','))
     if tasks is None:

+ 1 - 1
celery/fixups/django.py

@@ -27,7 +27,7 @@ def _maybe_close_fd(fh):
 def fixup(app):
     if SETTINGS_MODULE:
         try:
-            import django
+            import django  # noqa
         except ImportError:
             warnings.warn(FixupWarning(ERR_NOT_INSTALLED))
         return DjangoFixup(app).install()

+ 1 - 6
celery/platforms.py

@@ -266,13 +266,8 @@ def fileno(f):
 def maybe_fileno(f):
     """Get object fileno, or :const:`None` if not defined."""
     try:
-<<<<<<< HEAD
-        return f.fileno()
-    except FILENO_ERRORS:
-=======
         return fileno(f)
-    except AttributeError:
->>>>>>> 3.0
+    except FILENO_ERRORS:
         pass
 
 

+ 2 - 2
celery/worker/consumer.py

@@ -39,7 +39,7 @@ from celery.utils.timer2 import default_timer
 from celery.utils.timeutils import humanize_seconds, rate
 
 from . import heartbeat, loops, pidbox
-from .state import task_reserved, maybe_shutdown, revoked
+from .state import task_reserved, maybe_shutdown, revoked, reserved_requests
 
 CLOSE = bootsteps.CLOSE
 logger = get_logger(__name__)
@@ -271,7 +271,7 @@ class Consumer(object):
         # They can't be acked anyway, as a delivery tag is specific
         # to the current channel.
         self.timer.clear()
-        state.reserved_requests.clear()
+        reserved_requests.clear()
 
     def connect(self):
         """Establish the broker connection.