@inspect_command(alias=u'dump_tasks', variadic=u'taskinfoitems', signature=u'[attr1 [attr2 [... [attrN]]]]')
def registered(state, taskinfoitems=None, builtins=False, **kwargs):
 reg = state.app.tasks
 taskinfoitems = (taskinfoitems or DEFAULT_TASK_INFO_ITEMS)
 tasks = (reg if builtins else (task for task in reg if (not task.startswith(u'celery.'))))
 def _extract_info(task):
  fields = {field: str(getattr(task, field, None)) for field in taskinfoitems if (getattr(task, field, None) is not None)}
  if fields:
   info = [u'='.join(f) for f in items(fields)]
   return u'{0} [{1}]'.format(task.name, u' '.join(info))
  return task.name
 return [_extract_info(reg[task]) for task in sorted(tasks)]

@ inspect_command ( alias = u'dump_tasks' , variadic = u'taskinfoitems' , signature = u'[attr1 [attr2 [... [attrN]]]]' ) def registered ( state , taskinfoitems = None , builtins = False , ** kwargs ) : reg = state . app . tasks taskinfoitems = ( taskinfoitems or DEFAULT_TASK_INFO_ITEMS ) tasks = ( reg if builtins else ( task for task in reg if ( not task . startswith ( u'celery.' ) ) ) ) def _extract_info ( task ) : fields = { field : str ( getattr ( task , field , None ) ) for field in taskinfoitems if ( getattr ( task , field , None ) is not None ) } if fields : info = [ u'=' . join ( f ) for f in items ( fields ) ] return u'{0} [{1}]' . format ( task . name , u' ' . join ( info ) ) return task . name return [ _extract_info ( reg [ task ] ) for task in sorted ( tasks ) ]
list of registered tasks .