@shared_task(bind=True)
def add_to_all(self, nums, val):
 subtasks = [add.s(num, val) for num in nums]
 raise self.replace(group(*subtasks))

@ shared_task ( bind = True ) def add_to_all ( self , nums , val ) : subtasks = [ add . s ( num , val ) for num in nums ] raise self . replace ( group ( * subtasks ) )
add the given value to all supplied numbers .