@juspay/neurolink 9.55.1 → 9.55.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,10 +6,21 @@
|
|
|
6
6
|
* - One-shot tasks → BullMQ delayed jobs
|
|
7
7
|
* - Survives process restarts (Redis-persisted)
|
|
8
8
|
*/
|
|
9
|
-
import { Queue, Worker } from "bullmq";
|
|
10
9
|
import { logger } from "../../utils/logger.js";
|
|
11
10
|
import { TaskError } from "../errors.js";
|
|
12
11
|
import { TASK_DEFAULTS, } from "../../types/index.js";
|
|
12
|
+
async function loadBullMQ() {
|
|
13
|
+
try {
|
|
14
|
+
return await import(/* @vite-ignore */ "bullmq");
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
const e = err instanceof Error ? err : null;
|
|
18
|
+
if (e?.code === "ERR_MODULE_NOT_FOUND" && e.message.includes("bullmq")) {
|
|
19
|
+
throw new Error('BullMQ task backend requires the "bullmq" package. Install it with:\n pnpm add bullmq', { cause: err });
|
|
20
|
+
}
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
13
24
|
const QUEUE_NAME = "neurolink-tasks";
|
|
14
25
|
export class BullMQBackend {
|
|
15
26
|
name = "bullmq";
|
|
@@ -21,9 +32,10 @@ export class BullMQBackend {
|
|
|
21
32
|
this.config = config;
|
|
22
33
|
}
|
|
23
34
|
async initialize() {
|
|
35
|
+
const { Queue: BullQueue, Worker: BullWorker } = await loadBullMQ();
|
|
24
36
|
const connection = this.getConnectionConfig();
|
|
25
|
-
this.queue = new
|
|
26
|
-
this.worker = new
|
|
37
|
+
this.queue = new BullQueue(QUEUE_NAME, { connection });
|
|
38
|
+
this.worker = new BullWorker(QUEUE_NAME, async (job) => {
|
|
27
39
|
const taskId = job.data.taskId;
|
|
28
40
|
const task = job.data.task;
|
|
29
41
|
const executor = this.executors.get(taskId);
|
|
@@ -6,10 +6,21 @@
|
|
|
6
6
|
* - One-shot tasks → BullMQ delayed jobs
|
|
7
7
|
* - Survives process restarts (Redis-persisted)
|
|
8
8
|
*/
|
|
9
|
-
import { Queue, Worker } from "bullmq";
|
|
10
9
|
import { logger } from "../../utils/logger.js";
|
|
11
10
|
import { TaskError } from "../errors.js";
|
|
12
11
|
import { TASK_DEFAULTS, } from "../../types/index.js";
|
|
12
|
+
async function loadBullMQ() {
|
|
13
|
+
try {
|
|
14
|
+
return await import(/* @vite-ignore */ "bullmq");
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
const e = err instanceof Error ? err : null;
|
|
18
|
+
if (e?.code === "ERR_MODULE_NOT_FOUND" && e.message.includes("bullmq")) {
|
|
19
|
+
throw new Error('BullMQ task backend requires the "bullmq" package. Install it with:\n pnpm add bullmq', { cause: err });
|
|
20
|
+
}
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
13
24
|
const QUEUE_NAME = "neurolink-tasks";
|
|
14
25
|
export class BullMQBackend {
|
|
15
26
|
name = "bullmq";
|
|
@@ -21,9 +32,10 @@ export class BullMQBackend {
|
|
|
21
32
|
this.config = config;
|
|
22
33
|
}
|
|
23
34
|
async initialize() {
|
|
35
|
+
const { Queue: BullQueue, Worker: BullWorker } = await loadBullMQ();
|
|
24
36
|
const connection = this.getConnectionConfig();
|
|
25
|
-
this.queue = new
|
|
26
|
-
this.worker = new
|
|
37
|
+
this.queue = new BullQueue(QUEUE_NAME, { connection });
|
|
38
|
+
this.worker = new BullWorker(QUEUE_NAME, async (job) => {
|
|
27
39
|
const taskId = job.data.taskId;
|
|
28
40
|
const task = job.data.task;
|
|
29
41
|
const executor = this.executors.get(taskId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.55.
|
|
3
|
+
"version": "9.55.2",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
6
6
|
"author": {
|
|
@@ -228,7 +228,6 @@
|
|
|
228
228
|
"@picovoice/cobra-node": "^3.0.2",
|
|
229
229
|
"adm-zip": "^0.5.16",
|
|
230
230
|
"ai": "^6.0.134",
|
|
231
|
-
"bullmq": "^5.52.2",
|
|
232
231
|
"chalk": "^5.6.2",
|
|
233
232
|
"croner": "^9.1.0",
|
|
234
233
|
"csv-parser": "^3.2.0",
|
|
@@ -248,8 +247,6 @@
|
|
|
248
247
|
"open": "^11.0.0",
|
|
249
248
|
"ora": "^9.3.0",
|
|
250
249
|
"p-limit": "^7.3.0",
|
|
251
|
-
"pdf-parse": "^2.4.5",
|
|
252
|
-
"pdf-to-img": "^5.0.0",
|
|
253
250
|
"pptxgenjs": "^4.0.1",
|
|
254
251
|
"redis": "^5.11.0",
|
|
255
252
|
"tar-stream": "^3.1.8",
|
|
@@ -275,6 +272,9 @@
|
|
|
275
272
|
},
|
|
276
273
|
"optionalDependencies": {
|
|
277
274
|
"@langfuse/otel": "^5.0.1",
|
|
275
|
+
"bullmq": "^5.52.2",
|
|
276
|
+
"pdf-parse": "^2.4.5",
|
|
277
|
+
"pdf-to-img": "^5.0.0",
|
|
278
278
|
"@fastify/cors": "^11.2.0",
|
|
279
279
|
"@fastify/rate-limit": "^10.3.0",
|
|
280
280
|
"@hono/node-server": "^1.19.9",
|