From 9a1411f9370071a0dc55925f033267ae4db6c4ff Mon Sep 17 00:00:00 2001 From: Lilith Date: Fri, 16 Jan 2026 15:18:12 -0800 Subject: [PATCH] =?UTF-8?q?chore(shared):=20=F0=9F=94=A7=20Update=20shared?= =?UTF-8?q?=20dependency=20versions=20and=20build=20configuration=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/package.json | 4 ++-- cli/src/queue-client.ts | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/cli/package.json b/cli/package.json index 6ab1d5e..de682ce 100644 --- a/cli/package.json +++ b/cli/package.json @@ -2,6 +2,7 @@ "name": "@lilith/queue-cli-ts", "version": "0.1.0", "description": "CLI tools for managing BullMQ queues", + "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", "bin": { @@ -16,8 +17,7 @@ }, "dependencies": { "bullmq": "^5.66.4", - "commander": "^12.1.0", - "ioredis": "^5.9.1" + "commander": "^12.1.0" }, "devDependencies": { "@types/node": "^22.19.5", diff --git a/cli/src/queue-client.ts b/cli/src/queue-client.ts index 92b7a81..bcdecd9 100644 --- a/cli/src/queue-client.ts +++ b/cli/src/queue-client.ts @@ -1,5 +1,4 @@ import { Queue, Job } from 'bullmq'; -import IORedis from 'ioredis'; export type JobState = 'waiting' | 'active' | 'completed' | 'failed' | 'delayed' | 'paused'; @@ -28,7 +27,6 @@ export interface JobInfo { } export class QueueClient { - private connection: IORedis; private queue: Queue; readonly queueName: string; readonly redisUrl: string; @@ -37,12 +35,13 @@ export class QueueClient { this.queueName = options.queueName; this.redisUrl = options.redisUrl || process.env.REDIS_URL || 'redis://localhost:6379'; - this.connection = new IORedis(this.redisUrl, { - maxRetriesPerRequest: null, - enableReadyCheck: false, + this.queue = new Queue(this.queueName, { + connection: { + url: this.redisUrl, + maxRetriesPerRequest: null, + enableReadyCheck: false, + }, }); - - this.queue = new Queue(this.queueName, { connection: this.connection }); } async getJobCounts(): Promise { @@ -164,6 +163,5 @@ export class QueueClient { async close(): Promise { await this.queue.close(); - await this.connection.quit(); } }