Example #1
0
        protected void AfterWork(JobHistory history)
        {
            _stopwatch.Stop();

            history.TimeSpentSeconds = ((double)_stopwatch.ElapsedMilliseconds / (double)1000);;
            _jobHistoryRepo.Insert(history);
        }
Example #2
0
        private void LogExecutorAddHistory(bool success, string details)
        {
            var history = new JobHistory()
            {
                JobName          = "JobExecutor",
                IsSuccess        = success,
                Details          = details,
                TimeSpentSeconds = ((double)_stopwatch.ElapsedMilliseconds / (double)1000),
            };

            _jobHistoryRepo.Insert(history);
        }