Skip to content

Commit

Permalink
StartupContext is not required for scheduled jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Apr 5, 2021
1 parent faed558 commit 182bbf6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ScheduledJobService(IServiceProvider serviceProvider, ILoggerFactory logg

protected override async Task ExecuteAsync(CancellationToken stoppingToken) {
// TODO: Add more logging throughout
var startupContext = _serviceProvider.GetRequiredService<StartupActionsContext>();
var startupContext = _serviceProvider.GetService<StartupActionsContext>();
if (startupContext != null) {
var result = await startupContext.WaitForStartupAsync(stoppingToken).AnyContext();
if (!result.Success) {
Expand Down

0 comments on commit 182bbf6

Please sign in to comment.