fix #5193 - prevent scheduled jobs from blocking startup

This commit is contained in:
sbwalker 2025-03-25 19:07:01 -04:00
parent 2eac9c3795
commit 1ee92a248e

View File

@ -46,6 +46,8 @@ namespace Oqtane.Infrastructure
protected async Task ExecuteAsync(CancellationToken stoppingToken)
{
await Task.Yield(); // required so that this method does not block startup
while (!stoppingToken.IsCancellationRequested)
{
using (var scope = _serviceScopeFactory.CreateScope())