diff --git a/Iceshrimp.Backend/Core/Services/QueueService.cs b/Iceshrimp.Backend/Core/Services/QueueService.cs index 409f4e80..07645fb0 100644 --- a/Iceshrimp.Backend/Core/Services/QueueService.cs +++ b/Iceshrimp.Backend/Core/Services/QueueService.cs @@ -32,7 +32,6 @@ public class QueueService(IServiceScopeFactory scopeFactory) : BackgroundService { _queues.AddRange([InboxQueue, PreDeliverQueue, DeliverQueue, BackgroundTaskQueue]); - await RecoverOrPrepareForExitAsync(); token.Register(RecoverOrPrepareForExit); _ = Task.Run(RegisterNotificationChannels, token); @@ -147,6 +146,7 @@ public class PostgresJobQueue( public async Task ExecuteAsync(IServiceScopeFactory scopeFactory, CancellationToken token) { _scopeFactory = scopeFactory; + await RecoverOrPrepareForExitAsync(); QueuedChannelEvent += (_, _) => _queuedChannel.Set(); DelayedChannelEvent += (_, _) => _delayedChannel.Set();