@nest-boot/bullmq-mikro-orm 7.2.0 → 8.0.0-beta.0
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.
- package/dist/bullmq-mikro-orm-module-options.interface.d.ts +2 -2
- package/dist/bullmq-mikro-orm-module-options.interface.js +1 -2
- package/dist/bullmq-mikro-orm.module-definition.d.ts +2 -2
- package/dist/bullmq-mikro-orm.module-definition.js +3 -7
- package/dist/bullmq-mikro-orm.module-definition.js.map +1 -1
- package/dist/bullmq-mikro-orm.module.d.ts +3 -3
- package/dist/bullmq-mikro-orm.module.js +11 -14
- package/dist/bullmq-mikro-orm.module.js.map +1 -1
- package/dist/bullmq-mikro-orm.service.d.ts +5 -5
- package/dist/bullmq-mikro-orm.service.js +27 -27
- package/dist/bullmq-mikro-orm.service.js.map +1 -1
- package/dist/entities/job.entity.d.ts +2 -2
- package/dist/entities/job.entity.js +51 -32
- package/dist/entities/job.entity.js.map +1 -1
- package/dist/enums/job-status.enum.js +2 -5
- package/dist/enums/job-status.enum.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -20
- package/dist/index.js.map +1 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.d.ts +1 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.js +10 -13
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.js.map +1 -1
- package/dist/utils/should-include-queue.util.js +1 -4
- package/dist/utils/should-include-queue.util.js.map +1 -1
- package/package.json +29 -30
- package/dist/bullmq-mikro-orm.module.spec.d.ts +0 -1
- package/dist/bullmq-mikro-orm.module.spec.js +0 -38
- package/dist/bullmq-mikro-orm.module.spec.js.map +0 -1
- package/dist/bullmq-mikro-orm.service.spec.d.ts +0 -1
- package/dist/bullmq-mikro-orm.service.spec.js +0 -199
- package/dist/bullmq-mikro-orm.service.spec.js.map +0 -1
- package/dist/entities/job.entity.spec.d.ts +0 -1
- package/dist/entities/job.entity.spec.js +0 -42
- package/dist/entities/job.entity.spec.js.map +0 -1
- package/dist/index.spec.d.ts +0 -1
- package/dist/index.spec.js +0 -47
- package/dist/index.spec.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.spec.d.ts +0 -1
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.spec.js +0 -22
- package/dist/utils/convert-bullmq-job-state-to-job-status.util.spec.js.map +0 -1
- package/dist/utils/should-include-queue.util.spec.d.ts +0 -1
- package/dist/utils/should-include-queue.util.spec.js +0 -62
- package/dist/utils/should-include-queue.util.spec.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EntityClass, EntityData } from "@mikro-orm/core";
|
|
1
|
+
import { type EntityClass, type EntityData } from "@mikro-orm/core";
|
|
2
2
|
import { Job } from "bullmq";
|
|
3
|
-
import { JobEntity } from "./entities/job.entity";
|
|
3
|
+
import { JobEntity } from "./entities/job.entity.js";
|
|
4
4
|
/** Configuration options for the BullMQ-MikroORM integration module. */
|
|
5
5
|
export interface BullMQMikroORMModuleOptions<T extends JobEntity = JobEntity> {
|
|
6
6
|
/** The MikroORM entity class used to persist BullMQ jobs. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BullMQMikroORMModuleOptions } from "./bullmq-mikro-orm-module-options.interface";
|
|
2
|
-
export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<BullMQMikroORMModuleOptions<import(".").JobEntity>, "forRoot", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
|
|
1
|
+
import { BullMQMikroORMModuleOptions } from "./bullmq-mikro-orm-module-options.interface.js";
|
|
2
|
+
export declare const ConfigurableModuleClass: import("@nestjs/common").ConfigurableModuleCls<BullMQMikroORMModuleOptions<import("./index.js").JobEntity>, "forRoot", "create", {}>, MODULE_OPTIONS_TOKEN: string | symbol;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.MODULE_OPTIONS_TOKEN = exports.ConfigurableModuleClass = void 0;
|
|
5
|
-
const common_1 = require("@nestjs/common");
|
|
6
|
-
_a = new common_1.ConfigurableModuleBuilder()
|
|
1
|
+
import { ConfigurableModuleBuilder } from "@nestjs/common";
|
|
2
|
+
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } = new ConfigurableModuleBuilder()
|
|
7
3
|
.setClassMethodName("forRoot")
|
|
8
|
-
.build()
|
|
4
|
+
.build();
|
|
9
5
|
//# sourceMappingURL=bullmq-mikro-orm.module-definition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullmq-mikro-orm.module-definition.js","sourceRoot":"","sources":["../src/bullmq-mikro-orm.module-definition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bullmq-mikro-orm.module-definition.js","sourceRoot":"","sources":["../src/bullmq-mikro-orm.module-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAI3D,MAAM,CAAC,MAAM,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,GAC5D,IAAI,yBAAyB,EAA+B;KACzD,kBAAkB,CAAC,SAAS,CAAC;KAC7B,KAAK,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConfigurableModuleAsyncOptions } from "@nestjs/common";
|
|
2
|
-
import { ConfigurableModuleClass } from "./bullmq-mikro-orm.module-definition";
|
|
3
|
-
import { BullMQMikroORMModuleOptions } from "./bullmq-mikro-orm-module-options.interface";
|
|
4
|
-
import { JobEntity } from "./entities/job.entity";
|
|
2
|
+
import { ConfigurableModuleClass } from "./bullmq-mikro-orm.module-definition.js";
|
|
3
|
+
import { BullMQMikroORMModuleOptions } from "./bullmq-mikro-orm-module-options.interface.js";
|
|
4
|
+
import { JobEntity } from "./entities/job.entity.js";
|
|
5
5
|
/**
|
|
6
6
|
* Module that integrates BullMQ job events with MikroORM persistence.
|
|
7
7
|
*
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
6
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const bullmq_mikro_orm_module_definition_1 = require("./bullmq-mikro-orm.module-definition");
|
|
13
|
-
const bullmq_mikro_orm_service_1 = require("./bullmq-mikro-orm.service");
|
|
7
|
+
import { Global, Module } from "@nestjs/common";
|
|
8
|
+
import { DiscoveryModule } from "@nestjs/core";
|
|
9
|
+
import { ConfigurableModuleClass } from "./bullmq-mikro-orm.module-definition.js";
|
|
10
|
+
import { BullMQMikroORMService } from "./bullmq-mikro-orm.service.js";
|
|
14
11
|
/**
|
|
15
12
|
* Module that integrates BullMQ job events with MikroORM persistence.
|
|
16
13
|
*
|
|
@@ -18,7 +15,7 @@ const bullmq_mikro_orm_service_1 = require("./bullmq-mikro-orm.service");
|
|
|
18
15
|
* Subscribes to BullMQ queue events and automatically persists job state
|
|
19
16
|
* changes to the database using the configured entity.
|
|
20
17
|
*/
|
|
21
|
-
let BullMQMikroORMModule = class BullMQMikroORMModule extends
|
|
18
|
+
let BullMQMikroORMModule = class BullMQMikroORMModule extends ConfigurableModuleClass {
|
|
22
19
|
/**
|
|
23
20
|
* Registers the module with synchronous options.
|
|
24
21
|
* @param options - Configuration including the job entity class
|
|
@@ -36,12 +33,12 @@ let BullMQMikroORMModule = class BullMQMikroORMModule extends bullmq_mikro_orm_m
|
|
|
36
33
|
return super.forRootAsync(options);
|
|
37
34
|
}
|
|
38
35
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
providers: [bullmq_mikro_orm_service_1.BullMQMikroORMService],
|
|
36
|
+
BullMQMikroORMModule = __decorate([
|
|
37
|
+
Global(),
|
|
38
|
+
Module({
|
|
39
|
+
imports: [DiscoveryModule],
|
|
40
|
+
providers: [BullMQMikroORMService],
|
|
45
41
|
})
|
|
46
42
|
], BullMQMikroORMModule);
|
|
43
|
+
export { BullMQMikroORMModule };
|
|
47
44
|
//# sourceMappingURL=bullmq-mikro-orm.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullmq-mikro-orm.module.js","sourceRoot":"","sources":["../src/bullmq-mikro-orm.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bullmq-mikro-orm.module.js","sourceRoot":"","sources":["../src/bullmq-mikro-orm.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAkC,MAAM,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAItE;;;;;;GAMG;AAMI,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,uBAAuB;IAC/D;;;;OAIG;IACH,MAAM,CAAC,OAAO,CACZ,OAAuC;QAEvC,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CACjB,OAAuE;QAEvE,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;CACF,CAAA;AAtBY,oBAAoB;IALhC,MAAM,EAAE;IACR,MAAM,CAAC;QACN,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,SAAS,EAAE,CAAC,qBAAqB,CAAC;KACnC,CAAC;GACW,oBAAoB,CAsBhC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EntityData, EntityManager } from "@mikro-orm/core";
|
|
2
|
-
import { OnApplicationBootstrap } from "@nestjs/common";
|
|
1
|
+
import { type EntityData, EntityManager } from "@mikro-orm/core";
|
|
2
|
+
import { type OnApplicationBootstrap } from "@nestjs/common";
|
|
3
3
|
import { DiscoveryService } from "@nestjs/core";
|
|
4
|
-
import { Job, JobState } from "bullmq";
|
|
5
|
-
import { BullMQMikroORMModuleOptions } from "./bullmq-mikro-orm-module-options.interface";
|
|
6
|
-
import { JobEntity } from "./entities/job.entity";
|
|
4
|
+
import { type Job, type JobState } from "bullmq";
|
|
5
|
+
import { type BullMQMikroORMModuleOptions } from "./bullmq-mikro-orm-module-options.interface.js";
|
|
6
|
+
import { JobEntity } from "./entities/job.entity.js";
|
|
7
7
|
export declare class BullMQMikroORMService implements OnApplicationBootstrap {
|
|
8
8
|
private readonly discoveryService;
|
|
9
9
|
private readonly em;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -11,25 +10,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const convert_bullmq_job_state_to_job_status_util_1 = require("./utils/convert-bullmq-job-state-to-job-status.util");
|
|
24
|
-
const should_include_queue_util_1 = require("./utils/should-include-queue.util");
|
|
13
|
+
import { EntityManager } from "@mikro-orm/core";
|
|
14
|
+
import { WorkerHost } from "@nest-boot/bullmq";
|
|
15
|
+
import { Cron } from "@nest-boot/schedule";
|
|
16
|
+
import { Inject, Injectable, } from "@nestjs/common";
|
|
17
|
+
import { DiscoveryService } from "@nestjs/core";
|
|
18
|
+
import { Queue } from "bullmq";
|
|
19
|
+
import { MODULE_OPTIONS_TOKEN } from "./bullmq-mikro-orm.module-definition.js";
|
|
20
|
+
import { convertBullmqJobStateToJobStatus } from "./utils/convert-bullmq-job-state-to-job-status.util.js";
|
|
21
|
+
import { shouldIncludeQueue } from "./utils/should-include-queue.util.js";
|
|
25
22
|
let BullMQMikroORMService = class BullMQMikroORMService {
|
|
23
|
+
discoveryService;
|
|
24
|
+
em;
|
|
25
|
+
options;
|
|
26
|
+
jobTTL = 1000 * 60 * 60 * 24 * 30;
|
|
27
|
+
includeQueues = [];
|
|
28
|
+
excludeQueues = [];
|
|
26
29
|
constructor(discoveryService, em, options) {
|
|
27
30
|
this.discoveryService = discoveryService;
|
|
28
31
|
this.em = em;
|
|
29
32
|
this.options = options;
|
|
30
|
-
this.jobTTL = 1000 * 60 * 60 * 24 * 30;
|
|
31
|
-
this.includeQueues = [];
|
|
32
|
-
this.excludeQueues = [];
|
|
33
33
|
this.jobTTL = this.options.jobTTL ?? this.jobTTL;
|
|
34
34
|
this.includeQueues = this.options.includeQueues ?? this.includeQueues;
|
|
35
35
|
this.excludeQueues = this.options.excludeQueues ?? this.excludeQueues;
|
|
@@ -48,7 +48,7 @@ let BullMQMikroORMService = class BullMQMikroORMService {
|
|
|
48
48
|
failedReason: job.failedReason ?? null,
|
|
49
49
|
priority: job.priority,
|
|
50
50
|
progress: job.progress,
|
|
51
|
-
status:
|
|
51
|
+
status: convertBullmqJobStateToJobStatus(latestJobState),
|
|
52
52
|
startedAt: job.processedOn ? new Date(job.processedOn) : null,
|
|
53
53
|
finishedAt: job.finishedOn ? new Date(job.finishedOn) : null,
|
|
54
54
|
createdAt: new Date(job.timestamp),
|
|
@@ -75,14 +75,14 @@ let BullMQMikroORMService = class BullMQMikroORMService {
|
|
|
75
75
|
onApplicationBootstrap() {
|
|
76
76
|
const instanceWrappers = this.discoveryService.getProviders();
|
|
77
77
|
instanceWrappers
|
|
78
|
-
.filter((provider) => provider.instance instanceof
|
|
79
|
-
.filter((provider) =>
|
|
78
|
+
.filter((provider) => provider.instance instanceof Queue)
|
|
79
|
+
.filter((provider) => shouldIncludeQueue(provider.instance.name, this.includeQueues, this.excludeQueues))
|
|
80
80
|
.forEach((provider) => {
|
|
81
81
|
void provider.instance.on("waiting", (job) => void this.upsertJob(job, "waiting"));
|
|
82
82
|
});
|
|
83
83
|
instanceWrappers
|
|
84
|
-
.filter((provider) => provider.instance instanceof
|
|
85
|
-
.filter((provider) =>
|
|
84
|
+
.filter((provider) => provider.instance instanceof WorkerHost)
|
|
85
|
+
.filter((provider) => shouldIncludeQueue(provider.instance.worker.name, this.includeQueues, this.excludeQueues))
|
|
86
86
|
.forEach((provider) => {
|
|
87
87
|
provider.instance.worker.on("active", (job) => void this.upsertJob(job, "active"));
|
|
88
88
|
provider.instance.worker.on("progress", (job) => void this.upsertJob(job, "active"));
|
|
@@ -91,17 +91,17 @@ let BullMQMikroORMService = class BullMQMikroORMService {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
exports.BullMQMikroORMService = BullMQMikroORMService;
|
|
95
94
|
__decorate([
|
|
96
|
-
|
|
95
|
+
Cron("0 * * * *"),
|
|
97
96
|
__metadata("design:type", Function),
|
|
98
97
|
__metadata("design:paramtypes", []),
|
|
99
98
|
__metadata("design:returntype", Promise)
|
|
100
99
|
], BullMQMikroORMService.prototype, "cleanHistoryJobs", null);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
__param(2,
|
|
104
|
-
__metadata("design:paramtypes", [
|
|
105
|
-
|
|
100
|
+
BullMQMikroORMService = __decorate([
|
|
101
|
+
Injectable(),
|
|
102
|
+
__param(2, Inject(MODULE_OPTIONS_TOKEN)),
|
|
103
|
+
__metadata("design:paramtypes", [DiscoveryService,
|
|
104
|
+
EntityManager, Object])
|
|
106
105
|
], BullMQMikroORMService);
|
|
106
|
+
export { BullMQMikroORMService };
|
|
107
107
|
//# sourceMappingURL=bullmq-mikro-orm.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bullmq-mikro-orm.service.js","sourceRoot":"","sources":["../src/bullmq-mikro-orm.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bullmq-mikro-orm.service.js","sourceRoot":"","sources":["../src/bullmq-mikro-orm.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAmB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EACL,MAAM,EACN,UAAU,GAEX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAA2B,KAAK,EAAE,MAAM,QAAQ,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAG/E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wDAAwD,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAGnE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAOb;IACA;IAEA;IATF,MAAM,GAAW,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GA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G,IAAI,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CACnD,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC;CACF,CAAA;AAvDO;IADL,IAAI,CAAC,WAAW,CAAC;;;;6DAOjB;AAlEU,qBAAqB;IADjC,UAAU,EAAE;IAUR,WAAA,MAAM,CAAC,oBAAoB,CAAC,CAAA;qCAFM,gBAAgB;QAC9B,aAAa;GARzB,qBAAqB,CAmHjC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,10 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const job_status_enum_1 = require("../enums/job-status.enum");
|
|
10
|
+
import { t } from "@mikro-orm/core";
|
|
11
|
+
import { Entity, Enum, Index, PrimaryKey, Property, } from "@mikro-orm/decorators/legacy";
|
|
12
|
+
import { JobStatus } from "../enums/job-status.enum.js";
|
|
15
13
|
/**
|
|
16
14
|
* Abstract base entity for persisting BullMQ job data in the database.
|
|
17
15
|
*
|
|
@@ -20,75 +18,96 @@ const job_status_enum_1 = require("../enums/job-status.enum");
|
|
|
20
18
|
* Automatically populated by the BullMQ-MikroORM subscriber.
|
|
21
19
|
*/
|
|
22
20
|
let JobEntity = class JobEntity {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
/** BullMQ job identifier. */
|
|
22
|
+
id;
|
|
23
|
+
/** Name of the BullMQ queue this job belongs to. */
|
|
24
|
+
queueName;
|
|
25
|
+
/** Job name (type identifier). */
|
|
26
|
+
name;
|
|
27
|
+
/** JSON payload of the job. */
|
|
28
|
+
data;
|
|
29
|
+
/** Return value from the job processor, if completed. */
|
|
30
|
+
returnValue;
|
|
31
|
+
/** Error message if the job failed. */
|
|
32
|
+
failedReason;
|
|
33
|
+
/** Job priority (lower values = higher priority). */
|
|
34
|
+
priority;
|
|
35
|
+
/** Current progress of the job (number or object). */
|
|
36
|
+
// eslint-disable-next-line @nest-boot/entity-property-config-from-types
|
|
37
|
+
progress;
|
|
38
|
+
/** Current status of the job. */
|
|
39
|
+
status;
|
|
40
|
+
/** Timestamp when the job started processing. */
|
|
41
|
+
startedAt;
|
|
42
|
+
/** Timestamp when the job finished processing. */
|
|
43
|
+
finishedAt;
|
|
44
|
+
/** Timestamp when the job was created. */
|
|
45
|
+
createdAt = new Date();
|
|
46
|
+
/** Timestamp of the last update. */
|
|
47
|
+
updatedAt = new Date();
|
|
29
48
|
};
|
|
30
|
-
exports.JobEntity = JobEntity;
|
|
31
49
|
__decorate([
|
|
32
|
-
|
|
50
|
+
PrimaryKey({ type: t.string }),
|
|
33
51
|
__metadata("design:type", String)
|
|
34
52
|
], JobEntity.prototype, "id", void 0);
|
|
35
53
|
__decorate([
|
|
36
|
-
|
|
54
|
+
Property({ type: t.string }),
|
|
37
55
|
__metadata("design:type", String)
|
|
38
56
|
], JobEntity.prototype, "queueName", void 0);
|
|
39
57
|
__decorate([
|
|
40
|
-
|
|
41
|
-
|
|
58
|
+
Index(),
|
|
59
|
+
Property({ type: t.string }),
|
|
42
60
|
__metadata("design:type", String)
|
|
43
61
|
], JobEntity.prototype, "name", void 0);
|
|
44
62
|
__decorate([
|
|
45
|
-
|
|
63
|
+
Property({ type: t.json }),
|
|
46
64
|
__metadata("design:type", Object)
|
|
47
65
|
], JobEntity.prototype, "data", void 0);
|
|
48
66
|
__decorate([
|
|
49
|
-
|
|
67
|
+
Property({ type: t.json, nullable: true }),
|
|
50
68
|
__metadata("design:type", Object)
|
|
51
69
|
], JobEntity.prototype, "returnValue", void 0);
|
|
52
70
|
__decorate([
|
|
53
|
-
|
|
71
|
+
Property({ type: t.string, nullable: true }),
|
|
54
72
|
__metadata("design:type", String)
|
|
55
73
|
], JobEntity.prototype, "failedReason", void 0);
|
|
56
74
|
__decorate([
|
|
57
|
-
|
|
75
|
+
Property({ type: t.integer }),
|
|
58
76
|
__metadata("design:type", Number)
|
|
59
77
|
], JobEntity.prototype, "priority", void 0);
|
|
60
78
|
__decorate([
|
|
61
|
-
|
|
79
|
+
Property({ type: t.json }),
|
|
62
80
|
__metadata("design:type", Object)
|
|
63
81
|
], JobEntity.prototype, "progress", void 0);
|
|
64
82
|
__decorate([
|
|
65
|
-
|
|
66
|
-
|
|
83
|
+
Index(),
|
|
84
|
+
Enum({ items: () => JobStatus }),
|
|
67
85
|
__metadata("design:type", String)
|
|
68
86
|
], JobEntity.prototype, "status", void 0);
|
|
69
87
|
__decorate([
|
|
70
|
-
|
|
88
|
+
Property({ type: t.datetime, nullable: true }),
|
|
71
89
|
__metadata("design:type", Date)
|
|
72
90
|
], JobEntity.prototype, "startedAt", void 0);
|
|
73
91
|
__decorate([
|
|
74
|
-
|
|
92
|
+
Property({ type: t.datetime, nullable: true }),
|
|
75
93
|
__metadata("design:type", Date)
|
|
76
94
|
], JobEntity.prototype, "finishedAt", void 0);
|
|
77
95
|
__decorate([
|
|
78
|
-
|
|
79
|
-
|
|
96
|
+
Index(),
|
|
97
|
+
Property({ type: t.datetime, defaultRaw: "now()" }),
|
|
80
98
|
__metadata("design:type", Object)
|
|
81
99
|
], JobEntity.prototype, "createdAt", void 0);
|
|
82
100
|
__decorate([
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
type:
|
|
101
|
+
Index(),
|
|
102
|
+
Property({
|
|
103
|
+
type: t.datetime,
|
|
86
104
|
defaultRaw: "now()",
|
|
87
105
|
onUpdate: () => new Date(),
|
|
88
106
|
}),
|
|
89
107
|
__metadata("design:type", Object)
|
|
90
108
|
], JobEntity.prototype, "updatedAt", void 0);
|
|
91
|
-
|
|
92
|
-
|
|
109
|
+
JobEntity = __decorate([
|
|
110
|
+
Entity({ abstract: true })
|
|
93
111
|
], JobEntity);
|
|
112
|
+
export { JobEntity };
|
|
94
113
|
//# sourceMappingURL=job.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job.entity.js","sourceRoot":"","sources":["../../src/entities/job.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"job.entity.js","sourceRoot":"","sources":["../../src/entities/job.entity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAY,CAAC,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,QAAQ,GACT,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;;;GAMG;AAEI,IAAe,SAAS,GAAxB,MAAe,SAAS;IAC7B,6BAA6B;IAE7B,EAAE,CAAU;IAEZ,oDAAoD;IAEpD,SAAS,CAAU;IAEnB,kCAAkC;IAGlC,IAAI,CAAU;IAEd,+BAA+B;IAE/B,IAAI,CAAO;IAEX,yDAAyD;IAEzD,WAAW,CAAO;IAElB,uCAAuC;IAEvC,YAAY,CAAU;IAEtB,qDAAqD;IAErD,QAAQ,CAAU;IAElB,sDAAsD;IACtD,wEAAwE;IAExE,QAAQ,CAAoB;IAE5B,iCAAiC;IAGjC,MAAM,CAAU;IAEhB,iDAAiD;IAEjD,SAAS,CAAQ;IAEjB,kDAAkD;IAElD,UAAU,CAAQ;IAElB,0CAA0C;IAG1C,SAAS,GAAc,IAAI,IAAI,EAAE,CAAC;IAElC,oCAAoC;IAOpC,SAAS,G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ANC,KAAK,EAAE;IACP,QAAQ,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,QAAQ;QAChB,UAAU,EAAE,OAAO;QACnB,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE;KAC3B,CAAC;;4CACgC;AA5Dd,SAAS;IAD9B,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;GACL,SAAS,CA6D9B"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JobStatus = void 0;
|
|
4
1
|
/** Enumeration of possible BullMQ job statuses persisted in the database. */
|
|
5
|
-
var JobStatus;
|
|
2
|
+
export var JobStatus;
|
|
6
3
|
(function (JobStatus) {
|
|
7
4
|
/** Job is actively being processed. */
|
|
8
5
|
JobStatus["ACTIVE"] = "active";
|
|
@@ -20,5 +17,5 @@ var JobStatus;
|
|
|
20
17
|
JobStatus["WAITING"] = "waiting";
|
|
21
18
|
/** Job is waiting for its child jobs to complete. */
|
|
22
19
|
JobStatus["WAITING_CHILDREN"] = "waiting-children";
|
|
23
|
-
})(JobStatus || (
|
|
20
|
+
})(JobStatus || (JobStatus = {}));
|
|
24
21
|
//# sourceMappingURL=job-status.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-status.enum.js","sourceRoot":"","sources":["../../src/enums/job-status.enum.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"job-status.enum.js","sourceRoot":"","sources":["../../src/enums/job-status.enum.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,CAAN,IAAY,SAiBX;AAjBD,WAAY,SAAS;IACnB,uCAAuC;IACvC,8BAAiB,CAAA;IACjB,sCAAsC;IACtC,oCAAuB,CAAA;IACvB,kDAAkD;IAClD,gCAAmB,CAAA;IACnB,0DAA0D;IAC1D,8BAAiB,CAAA;IACjB,+CAA+C;IAC/C,wCAA2B,CAAA;IAC3B,6BAA6B;IAC7B,gCAAmB,CAAA;IACnB,mDAAmD;IACnD,gCAAmB,CAAA;IACnB,qDAAqD;IACrD,kDAAqC,CAAA;AACvC,CAAC,EAjBW,SAAS,KAAT,SAAS,QAiBpB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./bullmq-mikro-orm.module";
|
|
2
|
-
export * from "./bullmq-mikro-orm-module-options.interface";
|
|
3
|
-
export * from "./entities/job.entity";
|
|
4
|
-
export * from "./enums/job-status.enum";
|
|
1
|
+
export * from "./bullmq-mikro-orm.module.js";
|
|
2
|
+
export * from "./bullmq-mikro-orm-module-options.interface.js";
|
|
3
|
+
export * from "./entities/job.entity.js";
|
|
4
|
+
export * from "./enums/job-status.enum.js";
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./bullmq-mikro-orm.module"), exports);
|
|
18
|
-
__exportStar(require("./bullmq-mikro-orm-module-options.interface"), exports);
|
|
19
|
-
__exportStar(require("./entities/job.entity"), exports);
|
|
20
|
-
__exportStar(require("./enums/job-status.enum"), exports);
|
|
1
|
+
export * from "./bullmq-mikro-orm.module.js";
|
|
2
|
+
export * from "./bullmq-mikro-orm-module-options.interface.js";
|
|
3
|
+
export * from "./entities/job.entity.js";
|
|
4
|
+
export * from "./enums/job-status.enum.js";
|
|
21
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JobState } from "bullmq";
|
|
2
|
-
import { JobStatus } from "../enums/job-status.enum";
|
|
2
|
+
import { JobStatus } from "../enums/job-status.enum.js";
|
|
3
3
|
/**
|
|
4
4
|
* Converts a BullMQ job state to the internal JobStatus enum.
|
|
5
5
|
* @param state - The BullMQ job state or "unknown".
|
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convertBullmqJobStateToJobStatus = convertBullmqJobStateToJobStatus;
|
|
4
|
-
const job_status_enum_1 = require("../enums/job-status.enum");
|
|
1
|
+
import { JobStatus } from "../enums/job-status.enum.js";
|
|
5
2
|
/**
|
|
6
3
|
* Converts a BullMQ job state to the internal JobStatus enum.
|
|
7
4
|
* @param state - The BullMQ job state or "unknown".
|
|
8
5
|
* @returns The corresponding JobStatus enum value.
|
|
9
6
|
*/
|
|
10
|
-
function convertBullmqJobStateToJobStatus(state) {
|
|
7
|
+
export function convertBullmqJobStateToJobStatus(state) {
|
|
11
8
|
switch (state) {
|
|
12
9
|
case "active":
|
|
13
|
-
return
|
|
10
|
+
return JobStatus.ACTIVE;
|
|
14
11
|
case "completed":
|
|
15
|
-
return
|
|
12
|
+
return JobStatus.COMPLETED;
|
|
16
13
|
case "delayed":
|
|
17
|
-
return
|
|
14
|
+
return JobStatus.DELAYED;
|
|
18
15
|
case "failed":
|
|
19
|
-
return
|
|
16
|
+
return JobStatus.FAILED;
|
|
20
17
|
case "prioritized":
|
|
21
|
-
return
|
|
18
|
+
return JobStatus.PRIORITIZED;
|
|
22
19
|
case "waiting":
|
|
23
|
-
return
|
|
20
|
+
return JobStatus.WAITING;
|
|
24
21
|
case "waiting-children":
|
|
25
|
-
return
|
|
22
|
+
return JobStatus.WAITING_CHILDREN;
|
|
26
23
|
default:
|
|
27
|
-
return
|
|
24
|
+
return JobStatus.UNKNOWN;
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
//# sourceMappingURL=convert-bullmq-job-state-to-job-status.util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert-bullmq-job-state-to-job-status.util.js","sourceRoot":"","sources":["../../src/utils/convert-bullmq-job-state-to-job-status.util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"convert-bullmq-job-state-to-job-status.util.js","sourceRoot":"","sources":["../../src/utils/convert-bullmq-job-state-to-job-status.util.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,KAA2B;IAE3B,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,SAAS,CAAC,MAAM,CAAC;QAE1B,KAAK,WAAW;YACd,OAAO,SAAS,CAAC,SAAS,CAAC;QAE7B,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC,OAAO,CAAC;QAE3B,KAAK,QAAQ;YACX,OAAO,SAAS,CAAC,MAAM,CAAC;QAE1B,KAAK,aAAa;YAChB,OAAO,SAAS,CAAC,WAAW,CAAC;QAE/B,KAAK,SAAS;YACZ,OAAO,SAAS,CAAC,OAAO,CAAC;QAE3B,KAAK,kBAAkB;YACrB,OAAO,SAAS,CAAC,gBAAgB,CAAC;QAEpC;YACE,OAAO,SAAS,CAAC,OAAO,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.shouldIncludeQueue = shouldIncludeQueue;
|
|
4
1
|
/**
|
|
5
2
|
* Determines whether a queue should be included.
|
|
6
3
|
* @param queueName - The queue name.
|
|
@@ -14,7 +11,7 @@ exports.shouldIncludeQueue = shouldIncludeQueue;
|
|
|
14
11
|
* 3. If in includeQueues, return true.
|
|
15
12
|
* 4. Otherwise return false.
|
|
16
13
|
*/
|
|
17
|
-
function shouldIncludeQueue(queueName, includeQueues, excludeQueues) {
|
|
14
|
+
export function shouldIncludeQueue(queueName, includeQueues, excludeQueues) {
|
|
18
15
|
// Check exclude list first (takes priority)
|
|
19
16
|
if (excludeQueues.includes(queueName)) {
|
|
20
17
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"should-include-queue.util.js","sourceRoot":"","sources":["../../src/utils/should-include-queue.util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"should-include-queue.util.js","sourceRoot":"","sources":["../../src/utils/should-include-queue.util.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAChC,SAAiB,EACjB,aAAuB,EACvB,aAAuB;IAEvB,4CAA4C;IAC5C,IAAI,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,mEAAmE;IACnE,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2BAA2B;IAC3B,OAAO,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC"}
|