Exemple #1
0
        public async Task <SchedulerData> Data()
        {
            var scheduler = await _schedulerProvider.Scheduler().ConfigureAwait(false);

            var metadata = await scheduler.GetMetaData().ConfigureAwait(false);

            return(new SchedulerData
            {
                Name = scheduler.SchedulerName,
                InstanceId = scheduler.SchedulerInstanceId,
                JobGroups = await GetJobGroups(scheduler).ConfigureAwait(false),
                TriggerGroups = await GetTriggerGroups(scheduler).ConfigureAwait(false),
                Status = await GetSchedulerStatus(scheduler).ConfigureAwait(false),
                IsRemote = metadata.SchedulerRemote,
                JobsExecuted = metadata.NumberOfJobsExecuted,
                JobsTotal = (await scheduler.GetJobKeys(GroupMatcher <JobKey> .AnyGroup()).ConfigureAwait(false)).Count,
                RunningSince = metadata.RunningSince.ToDateTime(),
                SchedulerType = metadata.SchedulerType,
            });
        }
 protected async Task <IScheduler> Scheduler()
 {
     return(await _schedulerProvider.Scheduler().ConfigureAwait(false));
 }