コード例 #1
0
ファイル: SeatService.cs プロジェクト: Noorivandi/SeatShare
        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);
            }
        }
コード例 #2
0
 public JobLogController(ILoginInfo loginInfo, IJobLogService JobLogService)
 {
     _service = JobLogService;
 }
コード例 #3
0
 public ScheduleController(IScheduleService scheduleService, IJobLogService jobLogService, ICommonService commonService, IErrorService errorService) : base(errorService)
 {
     _scheduleService = scheduleService;
     _jobLogService   = jobLogService;
     _commonService   = commonService;
 }
コード例 #4
0
ファイル: TaskLogger.cs プロジェクト: doordie1991/EasyModular
 public TaskLogger(IJobLogService service, QuartzOptions options)
 {
     _service = service;
     _options = options;
 }