Skip to content

Commit

Permalink
Build and pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kennsippell committed Dec 9, 2024
1 parent fc738e5 commit 5b21425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/worker/cht-conf-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export class ChtConfWorker {
const jobData: ChtConfJobData = job.data;

// Ensure server availability
const { shouldPostpone, reason } = await this.shouldPostpone(jobData);
if (shouldPostpone) {
await this.postpone(job, reason, processingToken);
const postponseReason = await this.shouldPostpone(jobData);
if (postponseReason) {
await this.postpone(job, postponseReason.reason, processingToken);
throw new DelayedError();
}

Expand Down
4 changes: 2 additions & 2 deletions src/worker/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { ChtConfWorker } from './cht-conf-worker';
import { WorkerConfig, checkRedisConnection } from '../config/config-worker';

(async () => {
const { queueName, redisConnection} = WorkerConfig;
const { moveContactQueue, redisConnection} = WorkerConfig;
await checkRedisConnection();
ChtConfWorker.processQueue(
queueName,
moveContactQueue,
redisConnection
);
console.log(`🚀 CHT Conf Worker is listening`);
Expand Down

0 comments on commit 5b21425

Please sign in to comment.