diff --git a/src/config/config-worker.ts b/src/config/config-worker.ts index ae6ee3f9..81313f85 100644 --- a/src/config/config-worker.ts +++ b/src/config/config-worker.ts @@ -11,7 +11,7 @@ export const WorkerConfig = { host: environment.REDIS_HOST, port: Number(environment.REDIS_PORT), }, - moveContactQueue: 'MOVE_CONTACT_QUEUE', + chtConfQueueName: 'MOVE_CONTACT_QUEUE', defaultJobOptions: { attempts: 3, // Max retries for a failed job backoff: { diff --git a/src/lib/queues.ts b/src/lib/queues.ts index 03d502a2..029c1219 100644 --- a/src/lib/queues.ts +++ b/src/lib/queues.ts @@ -36,7 +36,7 @@ export class BullQueue implements IQueue { } export const getChtConfQueue = () => new BullQueue( - WorkerConfig.moveContactQueue, + WorkerConfig.chtConfQueueName, WorkerConfig.redisConnection, WorkerConfig.defaultJobOptions ); diff --git a/src/liquid/place/manage_hierarchy_form.html b/src/liquid/place/manage_hierarchy_form.html index 9ce66b48..37c5dcbc 100644 --- a/src/liquid/place/manage_hierarchy_form.html +++ b/src/liquid/place/manage_hierarchy_form.html @@ -73,7 +73,7 @@

{{ destinationDescription }}

pauseOnHover: true, type: 'is-success', position: 'top-center', - message: `

Operation has been scheduled. Please allow up to 24 hours for processing.

`, + message: `

{{ op | capitalize }} operation scheduled. Please allow up to 24 hours for processing.

`, }); } } diff --git a/src/worker/cht-conf-worker.ts b/src/worker/cht-conf-worker.ts index 2b5e4322..32b6528b 100644 --- a/src/worker/cht-conf-worker.ts +++ b/src/worker/cht-conf-worker.ts @@ -58,7 +58,7 @@ export class ChtConfWorker { throw new DelayedError(); } - const result = await this.moveContact(job); + const result = await this.processChtConfJob(job); if (!result.success) { const errorMessage = `Job ${job.id} failed with the following error: ${result.message}`; console.error(errorMessage); @@ -109,7 +109,7 @@ export class ChtConfWorker { return axios.get(`${instanceUrl}/api/v2/monitoring`); } - private static async moveContact(job: Job): Promise { + private static async processChtConfJob(job: Job): Promise { try { const jobData: ChtConfJobData = job.data; diff --git a/src/worker/main.ts b/src/worker/main.ts index 3d02c501..5f31f806 100644 --- a/src/worker/main.ts +++ b/src/worker/main.ts @@ -6,10 +6,10 @@ import { ChtConfWorker } from './cht-conf-worker'; import { WorkerConfig, checkRedisConnection } from '../config/config-worker'; (async () => { - const { moveContactQueue, redisConnection} = WorkerConfig; + const { chtConfQueueName, redisConnection } = WorkerConfig; await checkRedisConnection(); ChtConfWorker.processQueue( - moveContactQueue, + chtConfQueueName, redisConnection ); console.log(`🚀 CHT Conf Worker is listening`);