mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Make first queue reconciliation immediate on startup (#18490)
This commit is contained in:
@@ -118,7 +118,7 @@ describe('ScalingService', () => {
|
||||
expect(Bull).toHaveBeenCalledWith(...bullConstructorArgs);
|
||||
expect(registerMainOrWebhookListenersSpy).toHaveBeenCalled();
|
||||
expect(registerWorkerListenersSpy).not.toHaveBeenCalled();
|
||||
expect(scheduleQueueRecoverySpy).toHaveBeenCalled();
|
||||
expect(scheduleQueueRecoverySpy).toHaveBeenCalledWith(0);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ export class ScalingService {
|
||||
|
||||
this.registerListeners();
|
||||
|
||||
if (this.instanceSettings.isLeader) this.scheduleQueueRecovery();
|
||||
if (this.instanceSettings.isLeader) this.scheduleQueueRecovery(0);
|
||||
|
||||
this.scheduleQueueMetrics();
|
||||
|
||||
@@ -460,6 +460,8 @@ export class ScalingService {
|
||||
}
|
||||
}, waitMs);
|
||||
|
||||
if (waitMs === 0) return;
|
||||
|
||||
const wait = [this.queueRecoveryContext.waitMs / Time.minutes.toMilliseconds, 'min'].join(' ');
|
||||
|
||||
this.logger.debug(`Scheduled queue recovery check for next ${wait}`);
|
||||
|
||||
Reference in New Issue
Block a user