File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,21 @@ async def init_async(self, cmd: Command):
9696 else :
9797 self .logger .warning ("DDR verification skipped." )
9898
99- await self .source_client .send_metric (f"{ cmd .value } .start" )
100- await self .destination_client .send_metric (f"{ cmd .value } .start" )
99+ if cmd in [Command .IMPORT ] and self .send_metrics :
100+ await self .source_client .send_metric (f"{ cmd .value } .start" )
101+ try :
102+ await self .destination_client .send_metric (f"{ cmd .value } .start" )
103+ except Exception :
104+ self .logger .info ("Optional destination not defined" )
105+ if cmd in [Command .SYNC , Command .RESET ] and self .send_metrics :
106+ await self .destination_client .send_metric (f"{ cmd .value } .start" )
107+ try :
108+ await self .source_client .send_metric (f"{ cmd .value } .start" )
109+ except Exception :
110+ self .logger .info ("Optional source not defined" )
111+ if cmd in [Command .MIGRATE ] and self .send_metrics :
112+ await self .source_client .send_metric (f"{ cmd .value } .start" )
113+ await self .destination_client .send_metric (f"{ cmd .value } .start" )
101114
102115 async def exit_async (self ):
103116 await self .source_client ._end_session ()
You can’t perform that action at this time.
0 commit comments