Ask Solem 12 years ago
parent
commit
d2f0258e86

+ 1 - 2
celery/app/control.py

@@ -95,8 +95,7 @@ class Control(object):
 
     def __init__(self, app=None):
         self.app = app_or_default(app)
-        self.mailbox = self.Mailbox('celery',
-                type='fanout')#, clock=self.app.clock)
+        self.mailbox = self.Mailbox('celery', type='fanout')
 
     @cached_property
     def inspect(self):

+ 0 - 1
celery/canvas.py

@@ -195,7 +195,6 @@ class Signature(dict):
 
         with app.producer_or_acquire(None) as P:
             props = type.backend.on_task_call(P, tid)
-            print('PROPS: %r' % (props, ))
             app.control.election(tid, 'task', self.clone(task_id=tid, **props),
                                  connection=P.connection)
             return type.AsyncResult(tid)

+ 1 - 5
celery/events/state.py

@@ -400,10 +400,6 @@ class State(object):
     def tasks_by_time(self, limit=None):
         """Generator giving tasks ordered by time,
         in ``(uuid, Task)`` tuples."""
-
-        print('TASKHEAP')
-        from pprint import pprint
-        pprint(self._taskheap)
         seen = set()
         for evtup in islice(reversed(self._taskheap), 0, limit):
             uuid = evtup[3].uuid
@@ -428,7 +424,7 @@ class State(object):
         """
         return islice(((uuid, task)
                         for uuid, task in self.tasks_by_time()
-                            if task.name == name), 0, limit)
+                            if task.worker.hostname == hostname), 0, limit)
 
     def task_types(self):
         """Returns a list of all seen task types."""

+ 0 - 1
celery/utils/__init__.py

@@ -9,7 +9,6 @@
 from __future__ import absolute_import, print_function
 
 import os
-import socket
 import sys
 import traceback
 import warnings

+ 0 - 1
celery/worker/consumer.py

@@ -496,7 +496,6 @@ class Mingle(bootsteps.StartStopStep):
             info('mingle: no one here')
 
 
-
 class Gossip(bootsteps.ConsumerStep):
     label = 'Gossip'
     requires = (Events, )

+ 0 - 1
celery/worker/control.py

@@ -294,7 +294,6 @@ def dump_conf(panel, **kwargs):
     return jsonify(dict(panel.app.conf))
 
 
-
 @Panel.register
 def election(panel, id, topic, action=None, **kwargs):
     panel.consumer.gossip.election(id, topic, action)