UpdateJob() public method

public UpdateJob ( string id, Status status, string outcome = null, string scriptName = null ) : void
id string
status Status
outcome string
scriptName string
return void
コード例 #1
0
        public void OnPerforming(PerformingContext filterContext)
        {
            var jobServices = new JobServices();
            var scriptName  = filterContext.BackgroundJob.Job.Args[0].ToString(); // TODO: test var scriptName = filterContext.BackgroundJob.Job.Method.Name;

            jobServices.UpdateJob(filterContext.BackgroundJob.Id, Status.Running, null, scriptName);
        }
コード例 #2
0
        public void OnStateElection(ElectStateContext context)
        {
            var jobServices = new JobServices();

            if (context.CandidateState is FailedState failedState)
            {
                jobServices.UpdateJob(context.BackgroundJob.Id, Status.Failed, failedState.Exception.Message);
            }
        }
コード例 #3
0
 public void OnStateElection(ElectStateContext context)
 {
     var jobService = new JobServices();
     var failedState = context.CandidateState as FailedState;
     if (failedState != null)
     {
         jobService.UpdateJob(context.BackgroundJob.Id, Status.Failed, failedState.Exception.Message);
     }
 }
コード例 #4
0
        public void OnStateElection(ElectStateContext context)
        {
            var jobService  = new JobServices();
            var failedState = context.CandidateState as FailedState;

            if (failedState != null)
            {
                jobService.UpdateJob(context.BackgroundJob.Id, Status.Failed, failedState.Exception.Message);
            }
        }
コード例 #5
0
        public void OnPerformed(PerformedContext filterContext)
        {
            var jobServices = new JobServices();

            jobServices.UpdateJob(filterContext.BackgroundJob.Id, Status.Completed);
        }
コード例 #6
0
 public void OnPerforming(PerformingContext filterContext)
 {
     var jobService = new JobServices();
     var scriptName = filterContext.BackgroundJob.Job.Args[0].ToString();
     jobService.UpdateJob(filterContext.BackgroundJob.Id, Status.Running, null, scriptName);
 }
コード例 #7
0
 public void OnPerformed(PerformedContext filterContext)
 {
     var jobService = new JobServices();
     jobService.UpdateJob(filterContext.BackgroundJob.Id, Status.Completed);
 }