public async Task <int> ProcessFailedJob(string topic, string[] list)
        {
            int deleteCount = 0;

            for (var i = list.Length - 1; i >= 0; i--)
            {
                if (_isStart == false)
                {
                    return(deleteCount);
                }
                var     jobId   = list[i];
                JobData jobData = await _redisStorage.GetJobData(jobId);

                if (jobData == null)
                {
                    await _redisStorage.RemoveErrorJobId(topic, jobId);

                    deleteCount++;
                    continue;
                }
                if (jobData.ErrorCount > _options.MaxErrorReTryCount)
                {
                    await _redisStorage.RemoveErrorJobId(topic, jobId);

                    deleteCount++;
                    continue;
                }

                if (jobData.Status == 0)
                {
                    //2种情况 1:在队列拉去之后未改状态之前   2:在队列拉出来之后就服务重启了(状态还是没改)

                    if (jobData.CheckedTime == 0)
                    {
                        await _redisStorage.SetJobCheckedTime(topic, jobId, DateUtils.GetTimeStamp());

                        await _redisStorage.ClearJobDataIfNotExists(jobId);                                                //防止垃圾数据,SetJobCheckedTime设置一条空数据
                    }
                    else if ((DateUtils.GetTimeStamp() - jobData.CheckedTime) > TimeSpan.FromSeconds(5).TotalMilliseconds) //一定是重启丢失了,再任务队列拉去完之后,不可能5秒状态还没改成功吧
                    {
                        await _redisStorage.ErrorReEnqueneDelay(topic, jobId, TimeSpan.Zero);

                        deleteCount++;
                    }
                }
                else if (jobData.Status == 1)
                {
                    //1:任务执行中  2:任务把状态改为1之后就重启了 3:执行完改状态失败了
                    if (jobData.ExecuteTime > 0 && (DateUtils.GetTimeStamp() - jobData.ExecuteTime) > (_options.ExecuteTimeoutSecond + 5) * 1000)//每个job有个超时时间,没有取系统配置
                    {
                        await _redisStorage.ErrorReEnqueneDelay(topic, jobId, TimeSpan.Zero);

                        deleteCount++;
                    }
                }
                else if (jobData.Status == 2)
                {
                    await _redisStorage.SuccessRemoveJobData(topic, jobId);

                    deleteCount++;
                    continue;
                }
                else if (jobData.Status == 9)
                {
                    var delaySecond = GetDelaySecond(jobData.ErrorCount);
                    await _redisStorage.ErrorReEnqueneDelay(topic, jobId, TimeSpan.FromSeconds(delaySecond));

                    deleteCount++;
                    _logger.LogInformation($"redis消费失败,topic:{jobData.Topic},{delaySecond}秒后将进行{jobData.ErrorCount }次重试");
                }
            }
            return(deleteCount);
        }