def move_by_idmap(map, **kwargs):
 def task_id_in_map(body, message):
  return map.get(body[u'id'])
 return move(task_id_in_map, limit=len(map), **kwargs)

def move_by_idmap ( map , ** kwargs ) : def task_id_in_map ( body , message ) : return map . get ( body [ u'id' ] ) return move ( task_id_in_map , limit = len ( map ) , ** kwargs )
move tasks by matching from a task_id: queue mapping .