Explorar o código

don't clobber other event types in enable_events.

Fixes: #2272
Konstantinos Koukopoulos %!s(int64=10) %!d(string=hai) anos
pai
achega
1632b43360
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/worker/control.py

+ 1 - 1
celery/worker/control.py

@@ -110,7 +110,7 @@ def report(state):
 @Panel.register
 def enable_events(state):
     dispatcher = state.consumer.event_dispatcher
-    if 'task' not in dispatcher.groups:
+    if dispatcher.groups and 'task' not in dispatcher.groups:
         dispatcher.groups.add('task')
         logger.info('Events of group {task} enabled by remote.')
         return {'ok': 'task events enabled'}