示例#1
0
        private async Task <HealthState> CheckAsync()
        {
            var anyErrors = false;

            foreach (var triggerKey in await scheduler.GetTriggerKeysAsync())
            {
                if (await scheduler.GetTriggerStateAsync(triggerKey) == TriggerState.Error)
                {
                    Log.Error("{jobId} job trigger is in an error state", triggerKey.Name);
                    anyErrors = true;
                    break;
                }
            }

            return(anyErrors ? HealthState.Error : HealthState.Ok);
        }