@vasrefil/api-toolkit 1.7.6 → 1.7.7
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Queue } from 'bullmq';
|
|
2
|
-
export declare const EmailQueue: Queue<any, any, string, any, any, string>;
|
|
3
|
-
export declare const InAppNotificationQueue: Queue<any, any, string, any, any, string>;
|
|
2
|
+
export declare const EmailQueue: () => Queue<any, any, string, any, any, string>;
|
|
3
|
+
export declare const InAppNotificationQueue: () => Queue<any, any, string, any, any, string>;
|
|
@@ -17,20 +17,22 @@ const backoff = {
|
|
|
17
17
|
type: 'exponential',
|
|
18
18
|
delay: 10000,
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
defaultJobOptions: {
|
|
20
|
+
const EmailQueue = () => {
|
|
21
|
+
const defaultJobOptions = {
|
|
23
22
|
attempts,
|
|
24
23
|
backoff,
|
|
25
24
|
removeOnComplete
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
};
|
|
26
|
+
return new bullmq_1.Queue(common_2.JOB.EMAIL, { connection, defaultJobOptions });
|
|
27
|
+
};
|
|
28
|
+
exports.EmailQueue = EmailQueue;
|
|
29
|
+
const InAppNotificationQueue = () => {
|
|
30
|
+
const defaultJobOptions = {
|
|
31
31
|
attempts: 1,
|
|
32
32
|
backoff,
|
|
33
33
|
removeOnComplete,
|
|
34
34
|
removeOnFail: removeOnComplete
|
|
35
|
-
}
|
|
36
|
-
});
|
|
35
|
+
};
|
|
36
|
+
return new bullmq_1.Queue(common_2.JOB.IN_APP_NOTIFICATION, { connection, defaultJobOptions });
|
|
37
|
+
};
|
|
38
|
+
exports.InAppNotificationQueue = InAppNotificationQueue;
|