Ejemplo n.º 1
0
        protected override async Task <bool> IsJobTimedOut(JobModel job, CancellationToken cancellationToken)
        {
            var isJobTimedOut = await base.IsJobTimedOut(job, cancellationToken);

            if (isJobTimedOut)
            {
                await EventPublisher.PeriodEndJobFinished(job, false);
            }

            return(isJobTimedOut);
        }
Ejemplo n.º 2
0
        protected override async Task <bool> CompleteJob(JobModel job, JobStatus status, DateTimeOffset endTime, CancellationToken cancellationToken)
        {
            var isComplete = await base.CompleteJob(job, status, endTime, cancellationToken);

            if (isComplete && job.Status != JobStatus.TimedOut)
            {
                await EventPublisher.PeriodEndJobFinished(job, job.Status == JobStatus.Completed);
            }

            return(isComplete);
        }