@servicelabsco/nestjs-utility-services 1.1.54 → 1.1.56
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/app.controller.d.ts +4 -8
- package/dist/app.controller.js +11 -14
- package/dist/app.controller.js.map +1 -1
- package/dist/app.module.js +3 -1
- package/dist/app.module.js.map +1 -1
- package/dist/auth/auth.module.js +1 -1
- package/dist/auth/auth.module.js.map +1 -1
- package/dist/auth/controllers/auth.controller.d.ts +6 -5
- package/dist/auth/controllers/auth.controller.js +0 -1
- package/dist/auth/controllers/auth.controller.js.map +1 -1
- package/dist/auth/controllers/social.controller.d.ts +3 -6
- package/dist/auth/controllers/social.controller.js +0 -44
- package/dist/auth/controllers/social.controller.js.map +1 -1
- package/dist/auth/middlewares/internal.middleware.js +1 -0
- package/dist/auth/middlewares/internal.middleware.js.map +1 -1
- package/dist/common/es6.classes.d.ts +1 -1
- package/dist/common/libraries/common.entity.d.ts +1 -0
- package/dist/common/libraries/common.entity.js +4 -0
- package/dist/common/libraries/common.entity.js.map +1 -1
- package/dist/common/libraries/common.job.d.ts +1 -0
- package/dist/common/libraries/common.job.js +1 -0
- package/dist/common/libraries/common.job.js.map +1 -1
- package/dist/config/entity.constants.d.ts +4 -0
- package/dist/config/entity.constants.js +4 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/migrations/1678730411972-CreatePendingBullJobTable.d.ts +5 -0
- package/dist/migrations/1678730411972-CreatePendingBullJobTable.js +24 -0
- package/dist/migrations/1678730411972-CreatePendingBullJobTable.js.map +1 -0
- package/dist/migrations/1678789489235-CreateFailedBullJobTable.d.ts +5 -0
- package/dist/migrations/1678789489235-CreateFailedBullJobTable.js +27 -0
- package/dist/migrations/1678789489235-CreateFailedBullJobTable.js.map +1 -0
- package/dist/platformUtility/consumers/job.consumer.d.ts +1 -0
- package/dist/platformUtility/consumers/job.consumer.js +14 -0
- package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
- package/dist/platformUtility/controllers/bull.job.controller.js +1 -0
- package/dist/platformUtility/controllers/bull.job.controller.js.map +1 -1
- package/dist/platformUtility/controllers/queue.controller.js.map +1 -1
- package/dist/platformUtility/dtos/failed.bull.job.attributes.dto.d.ts +3 -0
- package/dist/platformUtility/dtos/failed.bull.job.attributes.dto.js +8 -0
- package/dist/platformUtility/dtos/failed.bull.job.attributes.dto.js.map +1 -0
- package/dist/platformUtility/dtos/pending.bull.job.attributes.dto.d.ts +3 -0
- package/dist/platformUtility/dtos/pending.bull.job.attributes.dto.js +8 -0
- package/dist/platformUtility/dtos/pending.bull.job.attributes.dto.js.map +1 -0
- package/dist/platformUtility/entities/failed.bull.job.entity.d.ts +15 -0
- package/dist/platformUtility/entities/failed.bull.job.entity.js +66 -0
- package/dist/platformUtility/entities/failed.bull.job.entity.js.map +1 -0
- package/dist/platformUtility/entities/index.d.ts +2 -0
- package/dist/platformUtility/entities/index.js +19 -0
- package/dist/platformUtility/entities/index.js.map +1 -0
- package/dist/platformUtility/entities/pending.bull.job.entity.d.ts +12 -0
- package/dist/platformUtility/entities/pending.bull.job.entity.js +54 -0
- package/dist/platformUtility/entities/pending.bull.job.entity.js.map +1 -0
- package/dist/platformUtility/es6.classes.d.ts +9 -4
- package/dist/platformUtility/es6.classes.js +10 -1
- package/dist/platformUtility/es6.classes.js.map +1 -1
- package/dist/platformUtility/index.d.ts +1 -0
- package/dist/platformUtility/index.js +1 -0
- package/dist/platformUtility/index.js.map +1 -1
- package/dist/platformUtility/jobs/index.d.ts +2 -0
- package/dist/platformUtility/jobs/index.js +2 -0
- package/dist/platformUtility/jobs/index.js.map +1 -1
- package/dist/platformUtility/jobs/load.failed.bull.job.d.ts +9 -0
- package/dist/platformUtility/jobs/load.failed.bull.job.js +54 -0
- package/dist/platformUtility/jobs/load.failed.bull.job.js.map +1 -0
- package/dist/platformUtility/jobs/reload.pending.bull.job.d.ts +7 -0
- package/dist/platformUtility/jobs/reload.pending.bull.job.js +39 -0
- package/dist/platformUtility/jobs/reload.pending.bull.job.js.map +1 -0
- package/dist/platformUtility/jobs/test.job.d.ts +0 -1
- package/dist/platformUtility/jobs/test.job.js +0 -4
- package/dist/platformUtility/jobs/test.job.js.map +1 -1
- package/dist/platformUtility/platform.utility.module.js +3 -2
- package/dist/platformUtility/platform.utility.module.js.map +1 -1
- package/dist/platformUtility/services/cache.service.js +0 -1
- package/dist/platformUtility/services/cache.service.js.map +1 -1
- package/dist/platformUtility/services/es6.jobs.service.d.ts +5 -1
- package/dist/platformUtility/services/es6.jobs.service.js +10 -2
- package/dist/platformUtility/services/es6.jobs.service.js.map +1 -1
- package/dist/platformUtility/services/queue.service.d.ts +7 -1
- package/dist/platformUtility/services/queue.service.js +30 -3
- package/dist/platformUtility/services/queue.service.js.map +1 -1
- package/dist/platformUtility/subscribers/base.subscriber.d.ts +1 -1
- package/dist/platformUtility/subscribers/base.subscriber.js +12 -4
- package/dist/platformUtility/subscribers/base.subscriber.js.map +1 -1
- package/dist/system/controllers/index.d.ts +0 -1
- package/dist/system/controllers/index.js +0 -1
- package/dist/system/controllers/index.js.map +1 -1
- package/dist/system/entities/property.entity.d.ts +1 -0
- package/dist/system/entities/property.entity.js +4 -0
- package/dist/system/entities/property.entity.js.map +1 -1
- package/dist/system/es6.classes.d.ts +4 -5
- package/dist/system/es6.classes.js +0 -2
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/jobs/property.job.d.ts +4 -4
- package/dist/system/jobs/property.job.js +5 -13
- package/dist/system/jobs/property.job.js.map +1 -1
- package/dist/system/services/property.service.d.ts +2 -1
- package/dist/system/services/property.service.js +10 -0
- package/dist/system/services/property.service.js.map +1 -1
- package/dist/system/system.module.js +1 -1
- package/dist/system/system.module.js.map +1 -1
- package/package.json +4 -5
- package/dist/system/controllers/job.controller.d.ts +0 -16
- package/dist/system/controllers/job.controller.js +0 -137
- package/dist/system/controllers/job.controller.js.map +0 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FailedBullJobAttributesDto = void 0;
|
4
|
+
const common_attributes_dto_1 = require("./common.attributes.dto");
|
5
|
+
class FailedBullJobAttributesDto extends common_attributes_dto_1.CommonAttributesDto {
|
6
|
+
}
|
7
|
+
exports.FailedBullJobAttributesDto = FailedBullJobAttributesDto;
|
8
|
+
//# sourceMappingURL=failed.bull.job.attributes.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"failed.bull.job.attributes.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/failed.bull.job.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAE9D,MAAa,0BAA2B,SAAQ,2CAAmB;CAAG;AAAtE,gEAAsE"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.PendingBullJobAttributesDto = void 0;
|
4
|
+
const common_attributes_dto_1 = require("./common.attributes.dto");
|
5
|
+
class PendingBullJobAttributesDto extends common_attributes_dto_1.CommonAttributesDto {
|
6
|
+
}
|
7
|
+
exports.PendingBullJobAttributesDto = PendingBullJobAttributesDto;
|
8
|
+
//# sourceMappingURL=pending.bull.job.attributes.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pending.bull.job.attributes.dto.js","sourceRoot":"","sources":["../../../src/platformUtility/dtos/pending.bull.job.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAE9D,MAAa,2BAA4B,SAAQ,2CAAmB;CAAG;AAAvE,kEAAuE"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { CommonEntity } from '../../common/libraries/common.entity';
|
2
|
+
import { FailedBullJobAttributesDto } from '../dtos/failed.bull.job.attributes.dto';
|
3
|
+
export declare class FailedBullJobEntity extends CommonEntity {
|
4
|
+
protected enableRecordWatcher: boolean;
|
5
|
+
job_id: number;
|
6
|
+
identifier: string;
|
7
|
+
name: string;
|
8
|
+
payload: any;
|
9
|
+
options: any;
|
10
|
+
attempts: number;
|
11
|
+
failed_reason: string;
|
12
|
+
stack_trace: any;
|
13
|
+
initiated_at: Date;
|
14
|
+
attributes: FailedBullJobAttributesDto;
|
15
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.FailedBullJobEntity = void 0;
|
13
|
+
const typeorm_1 = require("typeorm");
|
14
|
+
const common_entity_1 = require("../../common/libraries/common.entity");
|
15
|
+
const failed_bull_job_attributes_dto_1 = require("../dtos/failed.bull.job.attributes.dto");
|
16
|
+
let FailedBullJobEntity = class FailedBullJobEntity extends common_entity_1.CommonEntity {
|
17
|
+
constructor() {
|
18
|
+
super(...arguments);
|
19
|
+
this.enableRecordWatcher = false;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
__decorate([
|
23
|
+
(0, typeorm_1.Column)(),
|
24
|
+
__metadata("design:type", Number)
|
25
|
+
], FailedBullJobEntity.prototype, "job_id", void 0);
|
26
|
+
__decorate([
|
27
|
+
(0, typeorm_1.Column)(),
|
28
|
+
__metadata("design:type", String)
|
29
|
+
], FailedBullJobEntity.prototype, "identifier", void 0);
|
30
|
+
__decorate([
|
31
|
+
(0, typeorm_1.Column)(),
|
32
|
+
__metadata("design:type", String)
|
33
|
+
], FailedBullJobEntity.prototype, "name", void 0);
|
34
|
+
__decorate([
|
35
|
+
(0, typeorm_1.Column)('json'),
|
36
|
+
__metadata("design:type", Object)
|
37
|
+
], FailedBullJobEntity.prototype, "payload", void 0);
|
38
|
+
__decorate([
|
39
|
+
(0, typeorm_1.Column)('json'),
|
40
|
+
__metadata("design:type", Object)
|
41
|
+
], FailedBullJobEntity.prototype, "options", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, typeorm_1.Column)(),
|
44
|
+
__metadata("design:type", Number)
|
45
|
+
], FailedBullJobEntity.prototype, "attempts", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, typeorm_1.Column)(),
|
48
|
+
__metadata("design:type", String)
|
49
|
+
], FailedBullJobEntity.prototype, "failed_reason", void 0);
|
50
|
+
__decorate([
|
51
|
+
(0, typeorm_1.Column)('json'),
|
52
|
+
__metadata("design:type", Object)
|
53
|
+
], FailedBullJobEntity.prototype, "stack_trace", void 0);
|
54
|
+
__decorate([
|
55
|
+
(0, typeorm_1.Column)(),
|
56
|
+
__metadata("design:type", Date)
|
57
|
+
], FailedBullJobEntity.prototype, "initiated_at", void 0);
|
58
|
+
__decorate([
|
59
|
+
(0, typeorm_1.Column)('json'),
|
60
|
+
__metadata("design:type", failed_bull_job_attributes_dto_1.FailedBullJobAttributesDto)
|
61
|
+
], FailedBullJobEntity.prototype, "attributes", void 0);
|
62
|
+
FailedBullJobEntity = __decorate([
|
63
|
+
(0, typeorm_1.Entity)('sys_failed_bull_jobs')
|
64
|
+
], FailedBullJobEntity);
|
65
|
+
exports.FailedBullJobEntity = FailedBullJobEntity;
|
66
|
+
//# sourceMappingURL=failed.bull.job.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"failed.bull.job.entity.js","sourceRoot":"","sources":["../../../src/platformUtility/entities/failed.bull.job.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,wEAAoE;AACpE,2FAAoF;AAS7E,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,4BAAY;IAA9C;;QAOO,wBAAmB,GAAY,KAAK,CAAC;IAiCnD,CAAC;CAAA,CAAA;AA/BG;IAAC,IAAA,gBAAM,GAAE;;mDACM;AAEf;IAAC,IAAA,gBAAM,GAAE;;uDACU;AAEnB;IAAC,IAAA,gBAAM,GAAE;;iDACI;AAEb;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;oDACF;AAEb;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;oDACF;AAEb;IAAC,IAAA,gBAAM,GAAE;;qDACQ;AAEjB;IAAC,IAAA,gBAAM,GAAE;;0DACa;AAEtB;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;wDACE;AAEjB;IAAC,IAAA,gBAAM,GAAE;8BACK,IAAI;yDAAC;AAEnB;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,2DAA0B;uDAAC;AArC9B,mBAAmB;IAD/B,IAAA,gBAAM,EAAC,sBAAsB,CAAC;GAClB,mBAAmB,CAwC/B;AAxCY,kDAAmB"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
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("./failed.bull.job.entity"), exports);
|
18
|
+
__exportStar(require("./pending.bull.job.entity"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,4DAA0C"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { CommonEntity } from '../../common/libraries/common.entity';
|
2
|
+
import { PendingBullJobAttributesDto } from '../dtos/pending.bull.job.attributes.dto';
|
3
|
+
export declare class PendingBullJobEntity extends CommonEntity {
|
4
|
+
protected enableRecordWatcher: boolean;
|
5
|
+
job_id: number;
|
6
|
+
identifier: string;
|
7
|
+
name: string;
|
8
|
+
payload: any;
|
9
|
+
initiated_at: Date;
|
10
|
+
options: any;
|
11
|
+
attributes: PendingBullJobAttributesDto;
|
12
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.PendingBullJobEntity = void 0;
|
13
|
+
const typeorm_1 = require("typeorm");
|
14
|
+
const common_entity_1 = require("../../common/libraries/common.entity");
|
15
|
+
const pending_bull_job_attributes_dto_1 = require("../dtos/pending.bull.job.attributes.dto");
|
16
|
+
let PendingBullJobEntity = class PendingBullJobEntity extends common_entity_1.CommonEntity {
|
17
|
+
constructor() {
|
18
|
+
super(...arguments);
|
19
|
+
this.enableRecordWatcher = false;
|
20
|
+
}
|
21
|
+
};
|
22
|
+
__decorate([
|
23
|
+
(0, typeorm_1.Column)(),
|
24
|
+
__metadata("design:type", Number)
|
25
|
+
], PendingBullJobEntity.prototype, "job_id", void 0);
|
26
|
+
__decorate([
|
27
|
+
(0, typeorm_1.Column)(),
|
28
|
+
__metadata("design:type", String)
|
29
|
+
], PendingBullJobEntity.prototype, "identifier", void 0);
|
30
|
+
__decorate([
|
31
|
+
(0, typeorm_1.Column)(),
|
32
|
+
__metadata("design:type", String)
|
33
|
+
], PendingBullJobEntity.prototype, "name", void 0);
|
34
|
+
__decorate([
|
35
|
+
(0, typeorm_1.Column)('json'),
|
36
|
+
__metadata("design:type", Object)
|
37
|
+
], PendingBullJobEntity.prototype, "payload", void 0);
|
38
|
+
__decorate([
|
39
|
+
(0, typeorm_1.Column)(),
|
40
|
+
__metadata("design:type", Date)
|
41
|
+
], PendingBullJobEntity.prototype, "initiated_at", void 0);
|
42
|
+
__decorate([
|
43
|
+
(0, typeorm_1.Column)('json'),
|
44
|
+
__metadata("design:type", Object)
|
45
|
+
], PendingBullJobEntity.prototype, "options", void 0);
|
46
|
+
__decorate([
|
47
|
+
(0, typeorm_1.Column)('json'),
|
48
|
+
__metadata("design:type", pending_bull_job_attributes_dto_1.PendingBullJobAttributesDto)
|
49
|
+
], PendingBullJobEntity.prototype, "attributes", void 0);
|
50
|
+
PendingBullJobEntity = __decorate([
|
51
|
+
(0, typeorm_1.Entity)('sys_pending_bull_jobs')
|
52
|
+
], PendingBullJobEntity);
|
53
|
+
exports.PendingBullJobEntity = PendingBullJobEntity;
|
54
|
+
//# sourceMappingURL=pending.bull.job.entity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pending.bull.job.entity.js","sourceRoot":"","sources":["../../../src/platformUtility/entities/pending.bull.job.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,wEAAoE;AACpE,6FAAsF;AAS/E,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,4BAAY;IAA/C;;QAOO,wBAAmB,GAAY,KAAK,CAAC;IAwBnD,CAAC;CAAA,CAAA;AAtBG;IAAC,IAAA,gBAAM,GAAE;;oDACM;AAEf;IAAC,IAAA,gBAAM,GAAE;;wDACU;AAEnB;IAAC,IAAA,gBAAM,GAAE;;kDACI;AAEb;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;qDACF;AAEb;IAAC,IAAA,gBAAM,GAAE;8BACK,IAAI;0DAAC;AAEnB;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;;qDACF;AAEb;IAAC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,6DAA2B;wDAAC;AA5B/B,oBAAoB;IADhC,IAAA,gBAAM,EAAC,uBAAuB,CAAC;GACnB,oBAAoB,CA+BhC;AA/BY,oDAAoB"}
|
@@ -14,7 +14,11 @@ import { PushNotificationResponseDto } from './dtos/push.notification.response.d
|
|
14
14
|
import { PushNotificationTemplateDto } from './dtos/push.notification.template.dto';
|
15
15
|
import { QueueOptionsDto } from './dtos/queue.options.dto';
|
16
16
|
import { RemoteRawResponseDto } from './dtos/remote.raw.response.dto';
|
17
|
+
import { FailedBullJobEntity } from './entities/failed.bull.job.entity';
|
18
|
+
import { PendingBullJobEntity } from './entities/pending.bull.job.entity';
|
19
|
+
import { LoadFailedBullJob } from './jobs/load.failed.bull.job';
|
17
20
|
import { RecordWatcherJob } from './jobs/record.watcher.job';
|
21
|
+
import { ReloadPendingBullJob } from './jobs/reload.pending.bull.job';
|
18
22
|
import { TestJob } from './jobs/test.job';
|
19
23
|
import { CommonSqsPolling } from './libraries/common.sqs.polling';
|
20
24
|
import { CreateEntityConstantsFile } from './libraries/create.entity.constants.file';
|
@@ -45,14 +49,15 @@ import { SqsService } from './services/sqs.service';
|
|
45
49
|
import { StartupService } from './services/startup.service';
|
46
50
|
import { BaseSubscriber } from './subscribers/base.subscriber';
|
47
51
|
declare const es6Classes: {
|
48
|
-
commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof
|
52
|
+
commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SyncClassCommand | typeof SqsWorkerCommand)[];
|
49
53
|
consumers: (typeof EventConsumer | typeof JobConsumer)[];
|
50
54
|
controllers: (typeof BullJobController | typeof QueueController)[];
|
51
|
-
dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof
|
52
|
-
|
55
|
+
dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof CommonAttributesDto | typeof RemoteRawResponseDto | typeof MailOptionsDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto)[];
|
56
|
+
entities: (typeof FailedBullJobEntity | typeof PendingBullJobEntity)[];
|
57
|
+
jobs: (typeof LoadFailedBullJob | typeof RecordWatcherJob | typeof ReloadPendingBullJob | typeof TestJob)[];
|
53
58
|
libraries: (typeof FileSystemUtility | typeof CommonSqsPolling | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessCommonMail | typeof ProcessPostmarkMail | typeof ProcessSmtpMail)[];
|
54
59
|
middlewares: (typeof MaintenanceMiddleware | typeof TrimPipe)[];
|
55
|
-
services: (typeof
|
60
|
+
services: (typeof CacheService | typeof RemoteRequestService | typeof SqlService | typeof DynamoService | typeof MaintenanceService | typeof ShutdownService | typeof AuditService | typeof FcmNotificationService | typeof MailService | typeof StartupService | typeof Es6JobsService | typeof Es6Service | typeof SqsService | typeof LocalPropertyService | typeof QueueService)[];
|
56
61
|
subscribers: (typeof BaseSubscriber)[];
|
57
62
|
};
|
58
63
|
export default es6Classes;
|
@@ -9,14 +9,20 @@ const job_consumer_1 = require("./consumers/job.consumer");
|
|
9
9
|
const bull_job_controller_1 = require("./controllers/bull.job.controller");
|
10
10
|
const queue_controller_1 = require("./controllers/queue.controller");
|
11
11
|
const common_attributes_dto_1 = require("./dtos/common.attributes.dto");
|
12
|
+
const failed_bull_job_attributes_dto_1 = require("./dtos/failed.bull.job.attributes.dto");
|
12
13
|
const fcm_response_dto_1 = require("./dtos/fcm.response.dto");
|
13
14
|
const job_payload_dto_1 = require("./dtos/job.payload.dto");
|
14
15
|
const mail_options_dto_1 = require("./dtos/mail.options.dto");
|
16
|
+
const pending_bull_job_attributes_dto_1 = require("./dtos/pending.bull.job.attributes.dto");
|
15
17
|
const push_notification_response_dto_1 = require("./dtos/push.notification.response.dto");
|
16
18
|
const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
|
17
19
|
const queue_options_dto_1 = require("./dtos/queue.options.dto");
|
18
20
|
const remote_raw_response_dto_1 = require("./dtos/remote.raw.response.dto");
|
21
|
+
const failed_bull_job_entity_1 = require("./entities/failed.bull.job.entity");
|
22
|
+
const pending_bull_job_entity_1 = require("./entities/pending.bull.job.entity");
|
23
|
+
const load_failed_bull_job_1 = require("./jobs/load.failed.bull.job");
|
19
24
|
const record_watcher_job_1 = require("./jobs/record.watcher.job");
|
25
|
+
const reload_pending_bull_job_1 = require("./jobs/reload.pending.bull.job");
|
20
26
|
const test_job_1 = require("./jobs/test.job");
|
21
27
|
const common_sqs_polling_1 = require("./libraries/common.sqs.polling");
|
22
28
|
const create_entity_constants_file_1 = require("./libraries/create.entity.constants.file");
|
@@ -52,15 +58,18 @@ const es6Classes = {
|
|
52
58
|
controllers: [bull_job_controller_1.BullJobController, queue_controller_1.QueueController],
|
53
59
|
dtos: [
|
54
60
|
common_attributes_dto_1.CommonAttributesDto,
|
61
|
+
failed_bull_job_attributes_dto_1.FailedBullJobAttributesDto,
|
55
62
|
fcm_response_dto_1.FcmResponseDto,
|
56
63
|
job_payload_dto_1.JobPayloadDto,
|
57
64
|
mail_options_dto_1.MailOptionsDto,
|
65
|
+
pending_bull_job_attributes_dto_1.PendingBullJobAttributesDto,
|
58
66
|
push_notification_response_dto_1.PushNotificationResponseDto,
|
59
67
|
push_notification_template_dto_1.PushNotificationTemplateDto,
|
60
68
|
queue_options_dto_1.QueueOptionsDto,
|
61
69
|
remote_raw_response_dto_1.RemoteRawResponseDto,
|
62
70
|
],
|
63
|
-
|
71
|
+
entities: [failed_bull_job_entity_1.FailedBullJobEntity, pending_bull_job_entity_1.PendingBullJobEntity],
|
72
|
+
jobs: [load_failed_bull_job_1.LoadFailedBullJob, record_watcher_job_1.RecordWatcherJob, reload_pending_bull_job_1.ReloadPendingBullJob, test_job_1.TestJob],
|
64
73
|
libraries: [
|
65
74
|
common_sqs_polling_1.CommonSqsPolling,
|
66
75
|
create_entity_constants_file_1.CreateEntityConstantsFile,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,wEAAmE;AACnE,8DAAyD;AACzD,4DAAuD;AACvD,8DAAyD;AACzD,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,kEAA6D;AAC7D,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,yEAAoE;AACpE,6EAAwE;AACxE,qEAAgE;AAChE,iFAA6E;AAC7E,uDAAmD;AACnD,4DAAwD;AACxD,4DAAwD;AACxD,8DAA0D;AAC1D,kEAA6D;AAC7D,wDAAoD;AACpD,kFAA6E;AAC7E,8EAAyE;AACzE,0DAAsD;AACtD,wEAAoE;AACpE,4DAAwD;AACxD,8EAAyE;AACzE,kEAA8D;AAC9D,wDAAoD;AACpD,wDAAoD;AACpD,gEAA4D;AAC5D,mEAA+D;AAE/D,MAAM,UAAU,GAAG;IACf,QAAQ,EAAE,CAAC,iDAAsB,EAAE,wCAAkB,EAAE,qCAAgB,EAAE,qCAAgB,CAAC;IAC1F,SAAS,EAAE,CAAC,8BAAa,EAAE,0BAAW,CAAC;IACvC,WAAW,EAAE,CAAC,uCAAiB,EAAE,kCAAe,CAAC;IACjD,IAAI,EAAE;QACF,2CAAmB;QACnB,iCAAc;QACd,+BAAa;QACb,iCAAc;QACd,4DAA2B;QAC3B,4DAA2B;QAC3B,mCAAe;QACf,8CAAoB;KACvB;IACD,IAAI,EAAE,CAAC,qCAAgB,EAAE,kBAAO,CAAC;
|
1
|
+
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/platformUtility/es6.classes.ts"],"names":[],"mappings":";;AAAA,kFAA6E;AAC7E,wEAAoE;AACpE,sEAAiE;AACjE,sEAAiE;AACjE,+DAA2D;AAC3D,2DAAuD;AACvD,2EAAsE;AACtE,qEAAiE;AACjE,wEAAmE;AACnE,0FAAmF;AACnF,8DAAyD;AACzD,4DAAuD;AACvD,8DAAyD;AACzD,4FAAqF;AACrF,0FAAoF;AACpF,0FAAoF;AACpF,gEAA2D;AAC3D,4EAAsE;AACtE,8EAAwE;AACxE,gFAA0E;AAC1E,sEAAgE;AAChE,kEAA6D;AAC7D,4EAAsE;AACtE,8CAA0C;AAC1C,uEAAkE;AAClE,2FAAqF;AACrF,iFAA2E;AAC3E,2EAAqE;AACrE,iFAA2E;AAC3E,qEAAgE;AAChE,yEAAoE;AACpE,yEAAoE;AACpE,6EAAwE;AACxE,qEAAgE;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,gCAAc,CAAC;CAChC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
@@ -18,6 +18,7 @@ __exportStar(require("./commands"), exports);
|
|
18
18
|
__exportStar(require("./consumers"), exports);
|
19
19
|
__exportStar(require("./controllers"), exports);
|
20
20
|
__exportStar(require("./dtos"), exports);
|
21
|
+
__exportStar(require("./entities"), exports);
|
21
22
|
__exportStar(require("./jobs"), exports);
|
22
23
|
__exportStar(require("./libraries"), exports);
|
23
24
|
__exportStar(require("./middlewares"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platformUtility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,gDAA8B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platformUtility/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,gDAA8B;AAC9B,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB;AACvB,8CAA4B;AAC5B,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,gDAA8B"}
|
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./load.failed.bull.job"), exports);
|
17
18
|
__exportStar(require("./record.watcher.job"), exports);
|
19
|
+
__exportStar(require("./reload.pending.bull.job"), exports);
|
18
20
|
__exportStar(require("./test.job"), exports);
|
19
21
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,6CAA2B"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,uDAAqC;AACrC,4DAA0C;AAC1C,6CAA2B"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { CommonJob } from '../../common/libraries/common.job';
|
2
|
+
import { QueueService } from '../services/queue.service';
|
3
|
+
export declare class LoadFailedBullJob extends CommonJob {
|
4
|
+
protected readonly queueService: QueueService;
|
5
|
+
protected disableDraining: boolean;
|
6
|
+
constructor(queueService: QueueService);
|
7
|
+
handle(): Promise<void>;
|
8
|
+
private setFailedJob;
|
9
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.LoadFailedBullJob = void 0;
|
13
|
+
const common_1 = require("@nestjs/common");
|
14
|
+
const common_job_1 = require("../../common/libraries/common.job");
|
15
|
+
const failed_bull_job_entity_1 = require("../entities/failed.bull.job.entity");
|
16
|
+
const queue_service_1 = require("../services/queue.service");
|
17
|
+
let LoadFailedBullJob = class LoadFailedBullJob extends common_job_1.CommonJob {
|
18
|
+
constructor(queueService) {
|
19
|
+
super();
|
20
|
+
this.queueService = queueService;
|
21
|
+
this.disableDraining = true;
|
22
|
+
}
|
23
|
+
async handle() {
|
24
|
+
while (true) {
|
25
|
+
const records = await this.queueService.getFailedJobs(0, 1000);
|
26
|
+
if (!records.length)
|
27
|
+
return;
|
28
|
+
for (const record of records) {
|
29
|
+
const job = await this.queueService.getJobDetails(record.id);
|
30
|
+
await this.setFailedJob(job);
|
31
|
+
await this.queueService.removeJob(record.id);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
async setFailedJob(job) {
|
36
|
+
const record = await failed_bull_job_entity_1.FailedBullJobEntity.firstOrNew({ job_id: job.id });
|
37
|
+
const data = job.data;
|
38
|
+
record.identifier = data.job;
|
39
|
+
record.name = data.name;
|
40
|
+
record.payload = { data: data.payload };
|
41
|
+
record.options = job.opts;
|
42
|
+
record.attempts = job.attemptsMade;
|
43
|
+
record.failed_reason = job.failedReason;
|
44
|
+
record.stack_trace = job.stacktrace;
|
45
|
+
record.initiated_at = new Date(job.timestamp);
|
46
|
+
return record.save();
|
47
|
+
}
|
48
|
+
};
|
49
|
+
LoadFailedBullJob = __decorate([
|
50
|
+
(0, common_1.Injectable)(),
|
51
|
+
__metadata("design:paramtypes", [queue_service_1.QueueService])
|
52
|
+
], LoadFailedBullJob);
|
53
|
+
exports.LoadFailedBullJob = LoadFailedBullJob;
|
54
|
+
//# sourceMappingURL=load.failed.bull.job.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"load.failed.bull.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/load.failed.bull.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,+EAAyE;AACzE,6DAAyD;AAGlD,IAAM,iBAA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AAG,GAAG,CAAC,UAAU,CAAC;QAEpC,MAAM,CAAC,YAAY,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE9C,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CACJ,CAAA;AA3DY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAeoC,4BAAY;GAdhD,iBAAiB,CA2D7B;AA3DY,8CAAiB"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { CommonJob } from '../../common/libraries/common.job';
|
2
|
+
import { QueueService } from '../services/queue.service';
|
3
|
+
export declare class ReloadPendingBullJob extends CommonJob {
|
4
|
+
protected readonly queueService: QueueService;
|
5
|
+
constructor(queueService: QueueService);
|
6
|
+
handle(): Promise<void>;
|
7
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
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
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.ReloadPendingBullJob = void 0;
|
13
|
+
const common_1 = require("@nestjs/common");
|
14
|
+
const common_job_1 = require("../../common/libraries/common.job");
|
15
|
+
const pending_bull_job_entity_1 = require("../entities/pending.bull.job.entity");
|
16
|
+
const queue_service_1 = require("../services/queue.service");
|
17
|
+
let ReloadPendingBullJob = class ReloadPendingBullJob extends common_job_1.CommonJob {
|
18
|
+
constructor(queueService) {
|
19
|
+
super();
|
20
|
+
this.queueService = queueService;
|
21
|
+
}
|
22
|
+
async handle() {
|
23
|
+
while (true) {
|
24
|
+
const records = await pending_bull_job_entity_1.PendingBullJobEntity.find({ order: { job_id: 'ASC' }, take: 500 });
|
25
|
+
if (!records.length)
|
26
|
+
return;
|
27
|
+
for (const record of records) {
|
28
|
+
await this.queueService.addJob(record.identifier, record.payload.data);
|
29
|
+
await record.remove();
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
ReloadPendingBullJob = __decorate([
|
35
|
+
(0, common_1.Injectable)(),
|
36
|
+
__metadata("design:paramtypes", [queue_service_1.QueueService])
|
37
|
+
], ReloadPendingBullJob);
|
38
|
+
exports.ReloadPendingBullJob = ReloadPendingBullJob;
|
39
|
+
//# sourceMappingURL=reload.pending.bull.job.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"reload.pending.bull.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/reload.pending.bull.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,iFAA2E;AAC3E,6DAAyD;AAGlD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sBAAS;IAC/C,YAA+B,YAA0B;QACrD,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IAED,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,EAAE;YACT,MAAM,OAAO,GAAG,MAAM,8CAAoB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;YAEzF,IAAI,CAAC,OAAO,CAAC,MAAM;gBAAE,OAAO;YAE5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC1B,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACvE,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC;aACzB;SACJ;IACL,CAAC;CACJ,CAAA;AAjBY,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEoC,4BAAY;GADhD,oBAAoB,CAiBhC;AAjBY,oDAAoB"}
|
@@ -2,7 +2,6 @@ import { CommonJob } from './../../common/libraries/common.job';
|
|
2
2
|
import { QueueService } from './../services/queue.service';
|
3
3
|
export declare class TestJob extends CommonJob {
|
4
4
|
protected readonly queueService: QueueService;
|
5
|
-
protected mode: string;
|
6
5
|
constructor(queueService: QueueService);
|
7
6
|
handle(data: any): Promise<void>;
|
8
7
|
}
|
@@ -17,12 +17,8 @@ let TestJob = class TestJob extends common_job_1.CommonJob {
|
|
17
17
|
constructor(queueService) {
|
18
18
|
super();
|
19
19
|
this.queueService = queueService;
|
20
|
-
this.mode = 'fifo';
|
21
20
|
}
|
22
21
|
async handle(data) {
|
23
|
-
for (let i = 0; i < 10; ++i) {
|
24
|
-
global.console.log('testjob', i);
|
25
|
-
}
|
26
22
|
}
|
27
23
|
};
|
28
24
|
TestJob = __decorate([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"test.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/test.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oEAAgE;AAChE,+DAA2D;AAGpD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,sBAAS;IAGlC,YAA+B,YAA0B;QACrD,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAc;
|
1
|
+
{"version":3,"file":"test.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/test.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oEAAgE;AAChE,+DAA2D;AAGpD,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,sBAAS;IAGlC,YAA+B,YAA0B;QACrD,KAAK,EAAE,CAAC;QADmB,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAS;IAEtB,CAAC;CACJ,CAAA;AAVY,OAAO;IADnB,IAAA,mBAAU,GAAE;qCAIoC,4BAAY;GAHhD,OAAO,CAUnB;AAVY,0BAAO"}
|
@@ -10,15 +10,16 @@ exports.PlatformUtilityModule = void 0;
|
|
10
10
|
const bull_1 = require("@nestjs/bull");
|
11
11
|
const common_1 = require("@nestjs/common");
|
12
12
|
const config = require("config");
|
13
|
-
const es6_classes_1 = require("./es6.classes");
|
14
13
|
const auth_module_1 = require("../auth/auth.module");
|
14
|
+
const system_module_1 = require("../system/system.module");
|
15
|
+
const es6_classes_1 = require("./es6.classes");
|
15
16
|
const cacheConfig = require("../config/cache.config");
|
16
17
|
const name = process.env.QUEUE_NAME || config.get('queue.name');
|
17
18
|
let PlatformUtilityModule = class PlatformUtilityModule {
|
18
19
|
};
|
19
20
|
PlatformUtilityModule = __decorate([
|
20
21
|
(0, common_1.Module)({
|
21
|
-
imports: [bull_1.BullModule.registerQueue({ name }), common_1.CacheModule.register(cacheConfig), (0, common_1.forwardRef)(() => auth_module_1.AuthModule)],
|
22
|
+
imports: [bull_1.BullModule.registerQueue({ name }), common_1.CacheModule.register(cacheConfig), (0, common_1.forwardRef)(() => auth_module_1.AuthModule), (0, common_1.forwardRef)(() => system_module_1.SystemModule)],
|
22
23
|
providers: [...es6_classes_1.default.services, ...es6_classes_1.default.consumers, ...es6_classes_1.default.subscribers, ...es6_classes_1.default.commands, ...es6_classes_1.default.jobs],
|
23
24
|
controllers: es6_classes_1.default.controllers,
|
24
25
|
exports: [...es6_classes_1.default.services, ...es6_classes_1.default.jobs],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"platform.utility.module.js","sourceRoot":"","sources":["../../src/platformUtility/platform.utility.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,2CAAiE;AACjE,iCAAiC;AACjC,+CAAuC;AACvC,
|
1
|
+
{"version":3,"file":"platform.utility.module.js","sourceRoot":"","sources":["../../src/platformUtility/platform.utility.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAA0C;AAC1C,2CAAiE;AACjE,iCAAiC;AACjC,qDAAiD;AACjD,2DAAuD;AACvD,+CAAuC;AACvC,sDAAuD;AAEvD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAQzD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAG,CAAA;AAAxB,qBAAqB;IANjC,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,iBAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,oBAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC,EAAE,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,4BAAY,CAAC,CAAC;QAC9I,SAAS,EAAE,CAAC,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,SAAS,EAAE,GAAG,qBAAU,CAAC,WAAW,EAAE,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,IAAI,CAAC;QACnI,WAAW,EAAE,qBAAU,CAAC,WAAW;QACnC,OAAO,EAAE,CAAC,GAAG,qBAAU,CAAC,QAAQ,EAAE,GAAG,qBAAU,CAAC,IAAI,CAAC;KACxD,CAAC;GACW,qBAAqB,CAAG;AAAxB,sDAAqB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cache.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/cache.service.ts"],"names":[],"mappings":";;;;;;;;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AAA,mBAAU,GAAE;IAOI,WAAA,IAAA,eAAM,EAAC,sBAAa,CAAC,CAAA;yDAAgC,qBAAK,oBAAL,qBAAK;GAN9D,YAAY,CAmExB;AAnEY,oCAAY"}
|
@@ -1,12 +1,16 @@
|
|
1
|
+
import { LoadFailedBullJob } from '../jobs/load.failed.bull.job';
|
1
2
|
import { RecordWatcherJob } from '../jobs/record.watcher.job';
|
3
|
+
import { ReloadPendingBullJob } from '../jobs/reload.pending.bull.job';
|
2
4
|
import { TestJob } from '../jobs/test.job';
|
3
5
|
import { LocalPropertyService } from '../../platformUtility/services/local.property.service';
|
4
6
|
export declare class Es6JobsService {
|
7
|
+
private readonly loadFailedBullJob;
|
5
8
|
private readonly recordWatcherJob;
|
9
|
+
private readonly reloadPendingBullJob;
|
6
10
|
private readonly testJob;
|
7
11
|
private readonly localPropertyService;
|
8
12
|
private jobs;
|
9
|
-
constructor(recordWatcherJob: RecordWatcherJob, testJob: TestJob, localPropertyService: LocalPropertyService);
|
13
|
+
constructor(loadFailedBullJob: LoadFailedBullJob, recordWatcherJob: RecordWatcherJob, reloadPendingBullJob: ReloadPendingBullJob, testJob: TestJob, localPropertyService: LocalPropertyService);
|
10
14
|
alignJobs(): void;
|
11
15
|
setJobs(): void;
|
12
16
|
}
|
@@ -11,12 +11,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.Es6JobsService = void 0;
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
|
+
const load_failed_bull_job_1 = require("../jobs/load.failed.bull.job");
|
14
15
|
const record_watcher_job_1 = require("../jobs/record.watcher.job");
|
16
|
+
const reload_pending_bull_job_1 = require("../jobs/reload.pending.bull.job");
|
15
17
|
const test_job_1 = require("../jobs/test.job");
|
16
18
|
const local_property_service_1 = require("../../platformUtility/services/local.property.service");
|
17
19
|
let Es6JobsService = class Es6JobsService {
|
18
|
-
constructor(recordWatcherJob, testJob, localPropertyService) {
|
20
|
+
constructor(loadFailedBullJob, recordWatcherJob, reloadPendingBullJob, testJob, localPropertyService) {
|
21
|
+
this.loadFailedBullJob = loadFailedBullJob;
|
19
22
|
this.recordWatcherJob = recordWatcherJob;
|
23
|
+
this.reloadPendingBullJob = reloadPendingBullJob;
|
20
24
|
this.testJob = testJob;
|
21
25
|
this.localPropertyService = localPropertyService;
|
22
26
|
this.jobs = {};
|
@@ -25,7 +29,9 @@ let Es6JobsService = class Es6JobsService {
|
|
25
29
|
}
|
26
30
|
alignJobs() {
|
27
31
|
this.jobs = {
|
32
|
+
'6370c1c0c8441652f5fd8e99291c213a': this.loadFailedBullJob,
|
28
33
|
'3873104b5fa6f9569331cfc3103bda43': this.recordWatcherJob,
|
34
|
+
'922b153398482362e7398f0f835827bd': this.reloadPendingBullJob,
|
29
35
|
b20ed62e97fbef22a56c84c4908996a6: this.testJob,
|
30
36
|
};
|
31
37
|
}
|
@@ -36,7 +42,9 @@ let Es6JobsService = class Es6JobsService {
|
|
36
42
|
};
|
37
43
|
Es6JobsService = __decorate([
|
38
44
|
(0, common_1.Injectable)(),
|
39
|
-
__metadata("design:paramtypes", [
|
45
|
+
__metadata("design:paramtypes", [load_failed_bull_job_1.LoadFailedBullJob,
|
46
|
+
record_watcher_job_1.RecordWatcherJob,
|
47
|
+
reload_pending_bull_job_1.ReloadPendingBullJob,
|
40
48
|
test_job_1.TestJob,
|
41
49
|
local_property_service_1.LocalPropertyService])
|
42
50
|
], Es6JobsService);
|