@control_command()
def enable_events(state):
 dispatcher = state.consumer.event_dispatcher
 if (dispatcher.groups and (u'task' not in dispatcher.groups)):
  dispatcher.groups.add(u'task')
  logger.info(u'Events of group {task} enabled by remote.')
  return ok(u'task events enabled')
 return ok(u'task events already enabled')

@ control_command ( ) def enable_events ( state ) : dispatcher = state . consumer . event_dispatcher if ( dispatcher . groups and ( u'task' not in dispatcher . groups ) ) : dispatcher . groups . add ( u'task' ) logger . info ( u'Events of group {task} enabled by remote.' ) return ok ( u'task events enabled' ) return ok ( u'task events already enabled' )
tell worker(s) to send task-related events .