Sfoglia il codice sorgente

ignore unknown events in consumer

Custom event types (not starting with either 'task-' or 'worker-') break Consumer, as it tries to split a `None` returned by state.event()
illes 10 anni fa
parent
commit
52b50e8cf4
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      celery/worker/consumer.py

+ 1 - 1
celery/worker/consumer.py

@@ -827,7 +827,7 @@ class Gossip(bootsteps.ConsumerStep):
                     message.payload['hostname'])
                     message.payload['hostname'])
         if hostname != self.hostname:
         if hostname != self.hostname:
             type, event = prepare(message.payload)
             type, event = prepare(message.payload)
-            obj, subject = self.update_state(event)
+            self.update_state(event)
         else:
         else:
             self.clock.forward()
             self.clock.forward()