@hastehaul/common 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.AbstractJobQueue = void 0;
|
4
4
|
const bullmq_1 = require("bullmq");
|
5
|
-
const
|
5
|
+
const connections_wrappers_1 = require("../../../connections-wrappers");
|
6
6
|
// Define the abstract class
|
7
7
|
class AbstractJobQueue {
|
8
8
|
constructor(queueName) {
|
9
|
-
this.que = new bullmq_1.Queue(queueName, { connection:
|
9
|
+
this.que = new bullmq_1.Queue(queueName, { connection: connections_wrappers_1.redisWrapper.client });
|
10
10
|
}
|
11
11
|
}
|
12
12
|
exports.AbstractJobQueue = AbstractJobQueue;
|
@@ -2,11 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.AbstractWorker = void 0;
|
4
4
|
const bullmq_1 = require("bullmq");
|
5
|
-
const
|
5
|
+
const connections_wrappers_1 = require("../../../connections-wrappers");
|
6
6
|
class AbstractWorker {
|
7
7
|
constructor(queueName) {
|
8
8
|
this.worker = new bullmq_1.Worker(queueName, this.process.bind(this), {
|
9
|
-
connection:
|
9
|
+
connection: connections_wrappers_1.redisWrapper.client,
|
10
10
|
autorun: false,
|
11
11
|
});
|
12
12
|
this.worker.on("error", (err) => {
|