fix(core): Disconnect Redis after pausing queue during worker shutdown (#9928)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
} from 'n8n-workflow';
|
||||
import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
import config from '@/config';
|
||||
import { HIGHEST_PRIORITY, OnShutdown } from './decorators/OnShutdown';
|
||||
|
||||
export type JobId = Bull.JobId;
|
||||
export type Job = Bull.Job<JobData>;
|
||||
@@ -108,11 +109,10 @@ export class Queue {
|
||||
return await this.jobQueue.client.ping();
|
||||
}
|
||||
|
||||
async pause({
|
||||
isLocal,
|
||||
doNotWaitActive,
|
||||
}: { isLocal?: boolean; doNotWaitActive?: boolean } = {}): Promise<void> {
|
||||
return await this.jobQueue.pause(isLocal, doNotWaitActive);
|
||||
@OnShutdown(HIGHEST_PRIORITY)
|
||||
// Stop accepting new jobs, `doNotWaitActive` allows reporting progress
|
||||
async pause(): Promise<void> {
|
||||
return await this.jobQueue?.pause(true, true);
|
||||
}
|
||||
|
||||
getBullObjectInstance(): JobQueue {
|
||||
|
||||
Reference in New Issue
Block a user