mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-02-21 18:28:39 -06:00
Scale workers on deleting job
This commit is contained in:
@@ -139,7 +139,7 @@ class JobQueue {
|
||||
return { jobs, load };
|
||||
} catch (error) {
|
||||
error.service === undefined ? (error.service = SERVICE_NAME) : null;
|
||||
errorObject.method === undefined
|
||||
error.method === undefined
|
||||
? (error.method = "getWorkerStats")
|
||||
: null;
|
||||
throw error;
|
||||
@@ -285,6 +285,8 @@ class JobQueue {
|
||||
service: SERVICE_NAME,
|
||||
jobId: monitor.id,
|
||||
});
|
||||
const workerStats = await this.getWorkerStats();
|
||||
await this.scaleWorkers(workerStats);
|
||||
} else {
|
||||
logger.error(errorMessages.JOB_QUEUE_DELETE_JOB, {
|
||||
service: SERVICE_NAME,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const { env } = require("process");
|
||||
const AppSettings = require("../models/AppSettings");
|
||||
const AppSettings = require("../db/models/AppSettings");
|
||||
const SERVICE_NAME = "SettingsService";
|
||||
const envConfig = {
|
||||
logLevel: undefined,
|
||||
|
||||
Reference in New Issue
Block a user