protected void AfterWork(JobHistory history) { _stopwatch.Stop(); history.TimeSpentSeconds = ((double)_stopwatch.ElapsedMilliseconds / (double)1000);; _jobHistoryRepo.Insert(history); }
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); }