X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FLCM.git;a=blobdiff_plain;f=osm_lcm%2Flcm_utils.py;fp=osm_lcm%2Flcm_utils.py;h=12fd7fbb0d6624397dc9e1f8a69e833aef3c79ed;hp=5817b16a701d8d8cedbb4dcce69f65d87701bfdb;hb=b6049d378301d13e0ddaadb8433b8ad20f4f8a23;hpb=e11384e1797ea0a5f8cd084d6f336948170bc640 diff --git a/osm_lcm/lcm_utils.py b/osm_lcm/lcm_utils.py index 5817b16..12fd7fb 100644 --- a/osm_lcm/lcm_utils.py +++ b/osm_lcm/lcm_utils.py @@ -567,17 +567,19 @@ class TaskRegistry(LcmBase): """ Cancel all active tasks of a concrete ns, nsi, vim_account, sdn identified for _id. If op_id is supplied only this is cancelled, and the same with task_name + :return: cancelled task to be awaited if needed """ if not self.task_registry[topic].get(_id): return for op_id in reversed(self.task_registry[topic][_id]): if target_op_id and target_op_id != op_id: continue - for task_name, task in self.task_registry[topic][_id][op_id].items(): + for task_name, task in list(self.task_registry[topic][_id][op_id].items()): if target_task_name and target_task_name != task_name: continue # result = task.cancel() + yield task # if result: # self.logger.debug("{} _id={} order_id={} task={} cancelled".format(topic, _id, op_id, task_name))