예제 #1
0
 private Task <IResponse> ExecuteAsync(IRequest request, ConnectSetting connectSetting = null)
 {
     if (connectSetting == null)
     {
         return(RetryPolicy.GetResponse(Extractor, request));
     }
     else
     {
         var copyConfig = config.Clone();
         copyConfig.Connection = connectSetting;
         return(new Retry.FixedCountPolicy(connectSetting.AttemptsTimes, connectSetting.RetryIntervalMs)
                .GetResponse(extractorFactory.CreateExtractor(SimulationEnabled, copyConfig), request));
     }
 }
예제 #2
0
 private Task <IResponse> ExecuteAsync(IRequest request)
 {
     return(RetryPolicy.GetResponse(Fetcher, request));
 }