@@ -265,7 +265,8 @@ def module_change_callback(session, sub_id, module, xpath, event, req_id, priv):
265265 )
266266 )
267267 task = subscription .loop .create_task (
268- callback (event_name , req_id , changes , private_data , ** extra_info )
268+ callback (event_name , req_id , changes , private_data , ** extra_info ),
269+ name = f'sr-module-change-{ event_name } -{ req_id } -{ xpath } ' ,
269270 )
270271 task .add_done_callback (
271272 functools .partial (subscription .task_done , task_id , event_name )
@@ -379,7 +380,8 @@ def oper_data_callback(session, sub_id, module, xpath, req_xpath, req_id, parent
379380
380381 if task_id not in subscription .tasks :
381382 task = subscription .loop .create_task (
382- callback (req_xpath , private_data , ** extra_info )
383+ callback (req_xpath , private_data , ** extra_info ),
384+ name = f'sr-oper-data-{ req_id } -{ xpath } ' ,
383385 )
384386 task .add_done_callback (
385387 functools .partial (subscription .task_done , task_id , "oper" )
@@ -502,7 +504,8 @@ def rpc_callback(session, sub_id, xpath, input_node, event, req_id, output_node,
502504
503505 if task_id not in subscription .tasks :
504506 task = subscription .loop .create_task (
505- callback (xpath , input_dict , event_name , private_data , ** extra_info )
507+ callback (xpath , input_dict , event_name , private_data , ** extra_info ),
508+ name = f'sr-rpc-{ xpath } ' ,
506509 )
507510 task .add_done_callback (
508511 functools .partial (subscription .task_done , task_id , event_name )
@@ -624,7 +627,8 @@ def event_notif_tree_callback(session, sub_id, notif_type, notif, timestamp, pri
624627 if is_async_func (callback ):
625628 task = subscription .loop .create_task (
626629 callback (
627- xpath , notif_type , notif_dict , timestamp , private_data , ** extra_info
630+ xpath , notif_type , notif_dict , timestamp , private_data , ** extra_info ,
631+ name = f'sr-rpc-event-notif-{ xpath } ' ,
628632 )
629633 )
630634 task .add_done_callback (
0 commit comments