public async Task StartAsync(CancellationToken cancellationToken) { // SystemTarget for provider init calls this.lifecycleSchedulingSystemTarget = Services.GetRequiredService <LifecycleSchedulingSystemTarget>(); this.fallbackScheduler = Services.GetRequiredService <FallbackSystemTarget>(); RegisterSystemTarget(lifecycleSchedulingSystemTarget); try { await this.scheduler.QueueTask(() => this.siloLifecycle.OnStart(cancellationToken), this.lifecycleSchedulingSystemTarget.SchedulingContext); } catch (Exception exc) { logger.Error(ErrorCode.SiloStartError, "Exception during Silo.Start", exc); throw; } }
public async Task StartAsync(CancellationToken cancellationToken) { StartTaskWithPerfAnalysis("Start Scheduler", scheduler.Start, new Stopwatch()); // SystemTarget for provider init calls this.lifecycleSchedulingSystemTarget = Services.GetRequiredService <LifecycleSchedulingSystemTarget>(); this.fallbackScheduler = Services.GetRequiredService <FallbackSystemTarget>(); RegisterSystemTarget(lifecycleSchedulingSystemTarget); try { await this.scheduler.QueueTask(() => this.siloLifecycle.OnStart(cancellationToken), this.lifecycleSchedulingSystemTarget.SchedulingContext); this.logger.LogInformation((int)ErrorCode.SiloStarted, "Silo started"); } catch (Exception exc) { logger.Error(ErrorCode.SiloStartError, "Exception during Silo.Start", exc); throw; } }