private void CheckBlackList(IJobLogService jobLogSrv, List <string> blackList, KeyValuePair <string, object> periodicallySrvEntry) { var last10 = jobLogSrv.GetDefaultQuery() .Where(x => x.JobName == periodicallySrvEntry.Key) .OrderByDescending(x => x.JobLogPK) .Select(x => x.Status) .Take(10) .ToList(); if (last10.Where(x => x == Constants.JobLogStates.Error).Count() >= 10) { blackList.Add(periodicallySrvEntry.Key); _logger.WarnFormat("Job {0} has more than 10 error in last it's log so remove it from execution list", periodicallySrvEntry.Key); } }
public JobLogController(ILoginInfo loginInfo, IJobLogService JobLogService) { _service = JobLogService; }
public ScheduleController(IScheduleService scheduleService, IJobLogService jobLogService, ICommonService commonService, IErrorService errorService) : base(errorService) { _scheduleService = scheduleService; _jobLogService = jobLogService; _commonService = commonService; }
public TaskLogger(IJobLogService service, QuartzOptions options) { _service = service; _options = options; }