@@ -265,7 +265,8 @@ def module_change_callback(session, sub_id, module, xpath, event, req_id, priv):
265
265
)
266
266
)
267
267
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 } " ,
269
270
)
270
271
task .add_done_callback (
271
272
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
379
380
380
381
if task_id not in subscription .tasks :
381
382
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 } " ,
383
385
)
384
386
task .add_done_callback (
385
387
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,
502
504
503
505
if task_id not in subscription .tasks :
504
506
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 } " ,
506
509
)
507
510
task .add_done_callback (
508
511
functools .partial (subscription .task_done , task_id , event_name )
@@ -624,7 +627,13 @@ def event_notif_tree_callback(session, sub_id, notif_type, notif, timestamp, pri
624
627
if is_async_func (callback ):
625
628
task = subscription .loop .create_task (
626
629
callback (
627
- xpath , notif_type , notif_dict , timestamp , private_data , ** extra_info
630
+ xpath ,
631
+ notif_type ,
632
+ notif_dict ,
633
+ timestamp ,
634
+ private_data ,
635
+ ** extra_info ,
636
+ name = f"sr-rpc-event-notif-{ xpath } " ,
628
637
)
629
638
)
630
639
task .add_done_callback (
0 commit comments