public override async Task<ReturnT> Execute(JobExecuteContext context) { _logger.LogInformation($"视频配置信息获取任务开始......开始时间:{DateTime.Now}"); try { // 重试机制(间隔30秒重试) var policy = Policy .Handle<Exception>() .WaitAndRetryAsync(5, retryAttempt => TimeSpan.FromSeconds(30), async (exception, retryCount) => { await Task.CompletedTask; _logger.LogError(exception, $"第{retryCount}次重试"); }); await policy.ExecuteAsync(async () => await _videoService.BatchSendWaitCreateVideoInfo()); } catch (Exception ex) { _logger.LogError($"{nameof(QueryWaitCreateVideoDataJobHandler)}作业失败,{ex}"); } _logger.LogInformation($"--------------------------------------------------------------------------------------------"); return ReturnT.SUCCESS; }