@connect_on_app_finalize
def add_accumulate_task(app):
 @app.task(bind=True, name=u'celery.accumulate', shared=False, lazy=False)
 def accumulate(self, *args, **kwargs):
  index = kwargs.get(u'index')
  return (args[index] if (index is not None) else args)
 return accumulate

@ connect_on_app_finalize def add_accumulate_task ( app ) : @ app . task ( bind = True , name = u'celery.accumulate' , shared = False , lazy = False ) def accumulate ( self , * args , ** kwargs ) : index = kwargs . get ( u'index' ) return ( args [ index ] if ( index is not None ) else args ) return accumulate
task used by task .