Esempio n. 1
0
        protected void UpdateExecutionInfo(Action <ScheduledJobExecution> updateAction)
        {
            try
            {
                if (JobExecutionId == Guid.Empty)
                {
                    return;
                }

                using (var unitOfWork = UnitOfWorkManager.Begin())
                {
                    var jobExecution = JobExecutionRepository.Get(JobExecutionId);
                    updateAction.Invoke(jobExecution);
                    JobExecutionRepository.Update(jobExecution);

                    // save changes
                    unitOfWork.Complete();
                }
            }
            catch (Exception e)
            {
                // rollback
                Logger.Error(e.Message, e);
            }
        }
Esempio n. 2
0
 protected ScheduledJobExecution GetExecutionRecord()
 {
     return(JobExecutionRepository.Get(JobExecutionId));
 }