protected override async Task ExecuteAsync(CancellationToken stoppingToken) { // Start all of the configured async projections daemon.StartAll(); // Runs all projections until there are no more events coming in await daemon.WaitForNonStaleResults(stoppingToken).ConfigureAwait(false); }
public Task StartAsync(CancellationToken cancellationToken) { Logger.Information("Projections starting"); var settings = new DaemonSettings { FetchingCooldown = 500.Milliseconds(), LeadingEdgeBuffer = 100.Milliseconds() }; _daemon = _store.BuildProjectionDaemon( logger: new SerilogDaemonLogger(), settings: settings ); _daemon.StartAll(); return(Task.CompletedTask); }