Ejemplo 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);
            }
        }
Ejemplo n.º 2
0
 protected ScheduledJobExecution GetExecutionRecord()
 {
     return(JobExecutionRepository.Get(JobExecutionId));
 }