Ejemplo n.º 1
0
 private static JobInfoDto FromJob(JobDecorator job)
 {
     return(new JobInfoDto()
     {
         Id = job.Id,
         Name = job.Name,
         Progress = job.Progress,
         Status = job.Status,
         ScheduledAt = job.RecurrencePeriod?.NextRunAt
     });
 }
Ejemplo n.º 2
0
        private void EnQueueJob(IJob job, Recurrence recurrence)
        {
            if (job == null)
            {
                return;
            }

            var decoratedJob = new JobDecorator(job, recurrence);

            _jobs[decoratedJob.Id] = decoratedJob;
            decoratedJob.Notifier  = this;
            _notificationsBroker.OnJobAdded(FromJob(decoratedJob));
        }