[backend/core] Fix NullReferenceException
This commit is contained in:
parent
9698e3d36d
commit
188a6f4251
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,6 @@ public class QueueService(IServiceScopeFactory scopeFactory) : BackgroundService
|
||||||
{
|
{
|
||||||
_queues.AddRange([InboxQueue, PreDeliverQueue, DeliverQueue, BackgroundTaskQueue]);
|
_queues.AddRange([InboxQueue, PreDeliverQueue, DeliverQueue, BackgroundTaskQueue]);
|
||||||
|
|
||||||
await RecoverOrPrepareForExitAsync();
|
|
||||||
token.Register(RecoverOrPrepareForExit);
|
token.Register(RecoverOrPrepareForExit);
|
||||||
|
|
||||||
_ = Task.Run(RegisterNotificationChannels, token);
|
_ = Task.Run(RegisterNotificationChannels, token);
|
||||||
|
@ -147,6 +146,7 @@ public class PostgresJobQueue<T>(
|
||||||
public async Task ExecuteAsync(IServiceScopeFactory scopeFactory, CancellationToken token)
|
public async Task ExecuteAsync(IServiceScopeFactory scopeFactory, CancellationToken token)
|
||||||
{
|
{
|
||||||
_scopeFactory = scopeFactory;
|
_scopeFactory = scopeFactory;
|
||||||
|
await RecoverOrPrepareForExitAsync();
|
||||||
|
|
||||||
QueuedChannelEvent += (_, _) => _queuedChannel.Set();
|
QueuedChannelEvent += (_, _) => _queuedChannel.Set();
|
||||||
DelayedChannelEvent += (_, _) => _delayedChannel.Set();
|
DelayedChannelEvent += (_, _) => _delayedChannel.Set();
|
||||||
|
|
Loading…
Add table
Reference in a new issue