@servicelabsco/nestjs-utility-services 1.1.53 → 1.1.55

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.
Files changed (118) hide show
  1. package/dist/app.controller.d.ts +4 -6
  2. package/dist/app.controller.js +13 -10
  3. package/dist/app.controller.js.map +1 -1
  4. package/dist/app.module.js +3 -1
  5. package/dist/app.module.js.map +1 -1
  6. package/dist/auth/auth.module.js +1 -1
  7. package/dist/auth/auth.module.js.map +1 -1
  8. package/dist/auth/controllers/auth.controller.d.ts +6 -5
  9. package/dist/auth/controllers/auth.controller.js +0 -1
  10. package/dist/auth/controllers/auth.controller.js.map +1 -1
  11. package/dist/auth/controllers/social.controller.d.ts +6 -4
  12. package/dist/auth/controllers/social.controller.js.map +1 -1
  13. package/dist/auth/middlewares/internal.middleware.js +1 -0
  14. package/dist/auth/middlewares/internal.middleware.js.map +1 -1
  15. package/dist/common/es6.classes.d.ts +1 -1
  16. package/dist/common/libraries/common.entity.d.ts +1 -0
  17. package/dist/common/libraries/common.entity.js +4 -0
  18. package/dist/common/libraries/common.entity.js.map +1 -1
  19. package/dist/common/libraries/common.job.d.ts +1 -0
  20. package/dist/common/libraries/common.job.js +1 -0
  21. package/dist/common/libraries/common.job.js.map +1 -1
  22. package/dist/config/entity.constants.d.ts +4 -0
  23. package/dist/config/entity.constants.js +4 -0
  24. package/dist/config/entity.constants.js.map +1 -1
  25. package/dist/migrations/1678730411972-CreatePendingBullJobTable.d.ts +5 -0
  26. package/dist/migrations/1678730411972-CreatePendingBullJobTable.js +24 -0
  27. package/dist/migrations/1678730411972-CreatePendingBullJobTable.js.map +1 -0
  28. package/dist/migrations/1678789489235-CreateFailedBullJobTable.d.ts +5 -0
  29. package/dist/migrations/1678789489235-CreateFailedBullJobTable.js +27 -0
  30. package/dist/migrations/1678789489235-CreateFailedBullJobTable.js.map +1 -0
  31. package/dist/platformUtility/consumers/job.consumer.d.ts +1 -0
  32. package/dist/platformUtility/consumers/job.consumer.js +14 -0
  33. package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
  34. package/dist/platformUtility/controllers/bull.job.controller.d.ts +15 -0
  35. package/dist/platformUtility/controllers/bull.job.controller.js +134 -0
  36. package/dist/platformUtility/controllers/bull.job.controller.js.map +1 -0
  37. package/dist/platformUtility/controllers/index.d.ts +1 -0
  38. package/dist/platformUtility/controllers/index.js +1 -0
  39. package/dist/platformUtility/controllers/index.js.map +1 -1
  40. package/dist/platformUtility/controllers/queue.controller.d.ts +0 -8
  41. package/dist/platformUtility/controllers/queue.controller.js +0 -97
  42. package/dist/platformUtility/controllers/queue.controller.js.map +1 -1
  43. package/dist/platformUtility/dtos/failed.bull.job.attributes.dto.d.ts +3 -0
  44. package/dist/platformUtility/dtos/failed.bull.job.attributes.dto.js +8 -0
  45. package/dist/platformUtility/dtos/failed.bull.job.attributes.dto.js.map +1 -0
  46. package/dist/platformUtility/dtos/pending.bull.job.attributes.dto.d.ts +3 -0
  47. package/dist/platformUtility/dtos/pending.bull.job.attributes.dto.js +8 -0
  48. package/dist/platformUtility/dtos/pending.bull.job.attributes.dto.js.map +1 -0
  49. package/dist/platformUtility/entities/failed.bull.job.entity.d.ts +15 -0
  50. package/dist/platformUtility/entities/failed.bull.job.entity.js +66 -0
  51. package/dist/platformUtility/entities/failed.bull.job.entity.js.map +1 -0
  52. package/dist/platformUtility/entities/index.d.ts +2 -0
  53. package/dist/platformUtility/entities/index.js +19 -0
  54. package/dist/platformUtility/entities/index.js.map +1 -0
  55. package/dist/platformUtility/entities/pending.bull.job.entity.d.ts +12 -0
  56. package/dist/platformUtility/entities/pending.bull.job.entity.js +54 -0
  57. package/dist/platformUtility/entities/pending.bull.job.entity.js.map +1 -0
  58. package/dist/platformUtility/es6.classes.d.ts +11 -5
  59. package/dist/platformUtility/es6.classes.js +12 -2
  60. package/dist/platformUtility/es6.classes.js.map +1 -1
  61. package/dist/platformUtility/index.d.ts +1 -0
  62. package/dist/platformUtility/index.js +1 -0
  63. package/dist/platformUtility/index.js.map +1 -1
  64. package/dist/platformUtility/jobs/failed.bull.job.job.d.ts +7 -0
  65. package/dist/platformUtility/jobs/failed.bull.job.job.js +29 -0
  66. package/dist/platformUtility/jobs/failed.bull.job.job.js.map +1 -0
  67. package/dist/platformUtility/jobs/index.d.ts +2 -0
  68. package/dist/platformUtility/jobs/index.js +2 -0
  69. package/dist/platformUtility/jobs/index.js.map +1 -1
  70. package/dist/platformUtility/jobs/load.failed.bull.job.d.ts +9 -0
  71. package/dist/platformUtility/jobs/load.failed.bull.job.js +54 -0
  72. package/dist/platformUtility/jobs/load.failed.bull.job.js.map +1 -0
  73. package/dist/platformUtility/jobs/pending.bull.job.job.d.ts +7 -0
  74. package/dist/platformUtility/jobs/pending.bull.job.job.js +29 -0
  75. package/dist/platformUtility/jobs/pending.bull.job.job.js.map +1 -0
  76. package/dist/platformUtility/jobs/reload.pending.bull.job.d.ts +7 -0
  77. package/dist/platformUtility/jobs/reload.pending.bull.job.js +39 -0
  78. package/dist/platformUtility/jobs/reload.pending.bull.job.js.map +1 -0
  79. package/dist/platformUtility/jobs/test.job.d.ts +0 -1
  80. package/dist/platformUtility/jobs/test.job.js +0 -4
  81. package/dist/platformUtility/jobs/test.job.js.map +1 -1
  82. package/dist/platformUtility/platform.utility.module.js +3 -2
  83. package/dist/platformUtility/platform.utility.module.js.map +1 -1
  84. package/dist/platformUtility/services/cache.service.js +0 -1
  85. package/dist/platformUtility/services/cache.service.js.map +1 -1
  86. package/dist/platformUtility/services/es6.jobs.service.d.ts +5 -1
  87. package/dist/platformUtility/services/es6.jobs.service.js +10 -2
  88. package/dist/platformUtility/services/es6.jobs.service.js.map +1 -1
  89. package/dist/platformUtility/services/queue.service.d.ts +7 -1
  90. package/dist/platformUtility/services/queue.service.js +31 -4
  91. package/dist/platformUtility/services/queue.service.js.map +1 -1
  92. package/dist/platformUtility/subscribers/base.subscriber.d.ts +1 -1
  93. package/dist/platformUtility/subscribers/base.subscriber.js +12 -4
  94. package/dist/platformUtility/subscribers/base.subscriber.js.map +1 -1
  95. package/dist/platformUtility/subscribers/failed.bull.job.subscriber.d.ts +12 -0
  96. package/dist/platformUtility/subscribers/failed.bull.job.subscriber.js +40 -0
  97. package/dist/platformUtility/subscribers/failed.bull.job.subscriber.js.map +1 -0
  98. package/dist/platformUtility/subscribers/pending.bull.job.subscriber.d.ts +12 -0
  99. package/dist/platformUtility/subscribers/pending.bull.job.subscriber.js +40 -0
  100. package/dist/platformUtility/subscribers/pending.bull.job.subscriber.js.map +1 -0
  101. package/dist/system/controllers/index.d.ts +0 -1
  102. package/dist/system/controllers/index.js +0 -1
  103. package/dist/system/controllers/index.js.map +1 -1
  104. package/dist/system/entities/property.entity.d.ts +1 -0
  105. package/dist/system/entities/property.entity.js +4 -0
  106. package/dist/system/entities/property.entity.js.map +1 -1
  107. package/dist/system/es6.classes.d.ts +4 -5
  108. package/dist/system/es6.classes.js +0 -2
  109. package/dist/system/es6.classes.js.map +1 -1
  110. package/dist/system/jobs/property.job.d.ts +4 -4
  111. package/dist/system/jobs/property.job.js +5 -13
  112. package/dist/system/jobs/property.job.js.map +1 -1
  113. package/dist/system/services/property.service.d.ts +2 -1
  114. package/dist/system/services/property.service.js +10 -0
  115. package/dist/system/services/property.service.js.map +1 -1
  116. package/dist/system/system.module.js +1 -1
  117. package/dist/system/system.module.js.map +1 -1
  118. package/package.json +4 -5
@@ -0,0 +1,134 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.BullJobController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const access_manager_1 = require("../../auth/services/access.manager");
18
+ const access_exception_1 = require("../../common/exceptions/access.exception");
19
+ const queue_service_1 = require("../services/queue.service");
20
+ const operation_exception_1 = require("../../common/exceptions/operation.exception");
21
+ let BullJobController = class BullJobController {
22
+ constructor(queueService, accessManager) {
23
+ this.queueService = queueService;
24
+ this.accessManager = accessManager;
25
+ }
26
+ async completed(param) {
27
+ await this.validate();
28
+ const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
29
+ const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
30
+ const start = (page - 1) * limit;
31
+ const end = page * limit;
32
+ return this.queueService.getCompletedJobs(start, end);
33
+ }
34
+ async failed(param) {
35
+ await this.validate();
36
+ const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
37
+ const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
38
+ const start = (page - 1) * limit;
39
+ const end = page * limit;
40
+ return this.queueService.getFailedJobs(start, end);
41
+ }
42
+ async waiting(param) {
43
+ await this.validate();
44
+ const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
45
+ const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
46
+ const start = (page - 1) * limit;
47
+ const end = page * limit;
48
+ return this.queueService.getWaitingJobs(start, end);
49
+ }
50
+ async delayed(param) {
51
+ await this.validate();
52
+ const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
53
+ const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
54
+ const start = (page - 1) * limit;
55
+ const end = page * limit;
56
+ return this.queueService.getDelayedJobs(start, end);
57
+ }
58
+ async show(id) {
59
+ await this.validate();
60
+ return this.queueService.getJobDetails(id);
61
+ }
62
+ async delete(id) {
63
+ await this.validate();
64
+ const job = await this.queueService.getJobDetails(id);
65
+ if (!job)
66
+ throw new operation_exception_1.OperationException(`No such job exists`);
67
+ await this.queueService.removeJob(id);
68
+ return job;
69
+ }
70
+ async retry(id) {
71
+ await this.validate();
72
+ return this.queueService.retryJob(id);
73
+ }
74
+ async validate() {
75
+ const hasAccess = await this.accessManager.hasRoleId(1);
76
+ if (!hasAccess)
77
+ throw new access_exception_1.AccessException('You dont have access to queue manager');
78
+ }
79
+ };
80
+ __decorate([
81
+ (0, common_1.Get)('completed'),
82
+ __param(0, (0, common_1.Query)()),
83
+ __metadata("design:type", Function),
84
+ __metadata("design:paramtypes", [Object]),
85
+ __metadata("design:returntype", Promise)
86
+ ], BullJobController.prototype, "completed", null);
87
+ __decorate([
88
+ (0, common_1.Get)('failed'),
89
+ __param(0, (0, common_1.Query)()),
90
+ __metadata("design:type", Function),
91
+ __metadata("design:paramtypes", [Object]),
92
+ __metadata("design:returntype", Promise)
93
+ ], BullJobController.prototype, "failed", null);
94
+ __decorate([
95
+ (0, common_1.Get)('waiting'),
96
+ __param(0, (0, common_1.Query)()),
97
+ __metadata("design:type", Function),
98
+ __metadata("design:paramtypes", [Object]),
99
+ __metadata("design:returntype", Promise)
100
+ ], BullJobController.prototype, "waiting", null);
101
+ __decorate([
102
+ (0, common_1.Get)('delayed'),
103
+ __param(0, (0, common_1.Query)()),
104
+ __metadata("design:type", Function),
105
+ __metadata("design:paramtypes", [Object]),
106
+ __metadata("design:returntype", Promise)
107
+ ], BullJobController.prototype, "delayed", null);
108
+ __decorate([
109
+ (0, common_1.Get)(':id'),
110
+ __param(0, (0, common_1.Param)('id')),
111
+ __metadata("design:type", Function),
112
+ __metadata("design:paramtypes", [Number]),
113
+ __metadata("design:returntype", Promise)
114
+ ], BullJobController.prototype, "show", null);
115
+ __decorate([
116
+ (0, common_1.Delete)(':id'),
117
+ __param(0, (0, common_1.Param)('id')),
118
+ __metadata("design:type", Function),
119
+ __metadata("design:paramtypes", [Number]),
120
+ __metadata("design:returntype", Promise)
121
+ ], BullJobController.prototype, "delete", null);
122
+ __decorate([
123
+ (0, common_1.Post)(':id/retry'),
124
+ __param(0, (0, common_1.Param)('id')),
125
+ __metadata("design:type", Function),
126
+ __metadata("design:paramtypes", [Number]),
127
+ __metadata("design:returntype", Promise)
128
+ ], BullJobController.prototype, "retry", null);
129
+ BullJobController = __decorate([
130
+ (0, common_1.Controller)('api/admin/bull-job'),
131
+ __metadata("design:paramtypes", [queue_service_1.QueueService, access_manager_1.AccessManager])
132
+ ], BullJobController);
133
+ exports.BullJobController = BullJobController;
134
+ //# sourceMappingURL=bull.job.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bull.job.controller.js","sourceRoot":"","sources":["../../../src/platformUtility/controllers/bull.job.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6E;AAC7E,uEAAmE;AACnE,+EAA2E;AAC3E,6DAAyD;AACzD,qFAAiF;AAG1E,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,YAA6B,YAA0B,EAAmB,aAA4B;QAAzE,iBAAY,GAAZ,YAAY,CAAc;QAAmB,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAGpG,AAAN,KAAK,CAAC,SAAS,CAAU,KAAU;QAC/B,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QAEtB,MAAM,IAAI,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,KAAI,CAAC,CAAC;QAC9B,MAAM,KAAK,GAAG,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,KAAI,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;QACjC,MAAM,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;QAEzB,OAAO,I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WAAA,IAAA,cAAK,GAAE,CAAA;;;;kDASvB;AAGK;IADL,IAAA,YAAG,EAAC,QAAQ,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;;;;+CAQpB;AAGK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;;;;gDAQrB;AAGK;IADL,IAAA,YAAG,EAAC,SAAS,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;;;;gDAQrB;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;6CAGtB;AAGK;IADL,IAAA,eAAM,EAAC,KAAK,CAAC;IACA,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;+CAQxB;AAGK;IADL,IAAA,aAAI,EAAC,WAAW,CAAC;IACL,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;8CAGvB;AArEQ,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,oBAAoB,CAAC;qCAEc,4BAAY,EAAkC,8BAAa;GAD7F,iBAAiB,CA2E7B;AA3EY,8CAAiB"}
@@ -1 +1,2 @@
1
+ export * from './bull.job.controller';
1
2
  export * from './queue.controller';
@@ -14,5 +14,6 @@ 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("./bull.job.controller"), exports);
17
18
  __exportStar(require("./queue.controller"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,qDAAmC"}
@@ -1,5 +1,4 @@
1
1
  import { AccessManager } from '../../auth/services/access.manager';
2
- import { IndexParamsDto } from '../../common/dtos/index.params.dto';
3
2
  import { QueueService } from '../services/queue.service';
4
3
  export declare class QueueController {
5
4
  private readonly queueService;
@@ -7,12 +6,5 @@ export declare class QueueController {
7
6
  constructor(queueService: QueueService, accessManager: AccessManager);
8
7
  get(): Promise<any>;
9
8
  workers(): Promise<any[]>;
10
- completed(param: IndexParamsDto): Promise<any[]>;
11
- failed(param: IndexParamsDto): Promise<any[]>;
12
- waiting(param: IndexParamsDto): Promise<any[]>;
13
- delayed(param: IndexParamsDto): Promise<any[]>;
14
- show(id: number): Promise<import("bull").Job<any>>;
15
- delete(id: number): Promise<void>;
16
- retry(id: number): Promise<import("bull").Job<any>>;
17
9
  validate(): Promise<void>;
18
10
  }
@@ -8,14 +8,10 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  exports.QueueController = void 0;
16
13
  const common_1 = require("@nestjs/common");
17
14
  const access_manager_1 = require("../../auth/services/access.manager");
18
- const index_params_dto_1 = require("../../common/dtos/index.params.dto");
19
15
  const access_exception_1 = require("../../common/exceptions/access.exception");
20
16
  const queue_service_1 = require("../services/queue.service");
21
17
  let QueueController = class QueueController {
@@ -31,50 +27,6 @@ let QueueController = class QueueController {
31
27
  await this.validate();
32
28
  return this.queueService.getWorkers();
33
29
  }
34
- async completed(param) {
35
- await this.validate();
36
- const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
37
- const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
38
- const start = (page - 1) * limit;
39
- const end = page * limit;
40
- return this.queueService.getCompletedJobs(start, end);
41
- }
42
- async failed(param) {
43
- await this.validate();
44
- const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
45
- const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
46
- const start = (page - 1) * limit;
47
- const end = page * limit;
48
- return this.queueService.getFailedJobs(start, end);
49
- }
50
- async waiting(param) {
51
- await this.validate();
52
- const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
53
- const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
54
- const start = (page - 1) * limit;
55
- const end = page * limit;
56
- return this.queueService.getWaitingJobs(start, end);
57
- }
58
- async delayed(param) {
59
- await this.validate();
60
- const page = (param === null || param === void 0 ? void 0 : param.page) || 1;
61
- const limit = (param === null || param === void 0 ? void 0 : param.limit) || 20;
62
- const start = (page - 1) * limit;
63
- const end = page * limit;
64
- return this.queueService.getDelayedJobs(start, end);
65
- }
66
- async show(id) {
67
- await this.validate();
68
- return this.queueService.getJobDetails(id);
69
- }
70
- async delete(id) {
71
- await this.validate();
72
- return this.queueService.removeJob(id);
73
- }
74
- async retry(id) {
75
- await this.validate();
76
- return this.queueService.retryJob(id);
77
- }
78
30
  async validate() {
79
31
  const hasAccess = await this.accessManager.hasRoleId(1);
80
32
  if (!hasAccess)
@@ -93,55 +45,6 @@ __decorate([
93
45
  __metadata("design:paramtypes", []),
94
46
  __metadata("design:returntype", Promise)
95
47
  ], QueueController.prototype, "workers", null);
96
- __decorate([
97
- (0, common_1.Get)('completed'),
98
- __param(0, (0, common_1.Query)()),
99
- __metadata("design:type", Function),
100
- __metadata("design:paramtypes", [index_params_dto_1.IndexParamsDto]),
101
- __metadata("design:returntype", Promise)
102
- ], QueueController.prototype, "completed", null);
103
- __decorate([
104
- (0, common_1.Get)('failed'),
105
- __param(0, (0, common_1.Query)()),
106
- __metadata("design:type", Function),
107
- __metadata("design:paramtypes", [index_params_dto_1.IndexParamsDto]),
108
- __metadata("design:returntype", Promise)
109
- ], QueueController.prototype, "failed", null);
110
- __decorate([
111
- (0, common_1.Get)('waiting'),
112
- __param(0, (0, common_1.Query)()),
113
- __metadata("design:type", Function),
114
- __metadata("design:paramtypes", [index_params_dto_1.IndexParamsDto]),
115
- __metadata("design:returntype", Promise)
116
- ], QueueController.prototype, "waiting", null);
117
- __decorate([
118
- (0, common_1.Get)('delayed'),
119
- __param(0, (0, common_1.Query)()),
120
- __metadata("design:type", Function),
121
- __metadata("design:paramtypes", [index_params_dto_1.IndexParamsDto]),
122
- __metadata("design:returntype", Promise)
123
- ], QueueController.prototype, "delayed", null);
124
- __decorate([
125
- (0, common_1.Get)(':id'),
126
- __param(0, (0, common_1.Param)('id')),
127
- __metadata("design:type", Function),
128
- __metadata("design:paramtypes", [Number]),
129
- __metadata("design:returntype", Promise)
130
- ], QueueController.prototype, "show", null);
131
- __decorate([
132
- (0, common_1.Delete)(':id'),
133
- __param(0, (0, common_1.Param)('id')),
134
- __metadata("design:type", Function),
135
- __metadata("design:paramtypes", [Number]),
136
- __metadata("design:returntype", Promise)
137
- ], QueueController.prototype, "delete", null);
138
- __decorate([
139
- (0, common_1.Post)(':id/retry'),
140
- __param(0, (0, common_1.Param)('id')),
141
- __metadata("design:type", Function),
142
- __metadata("design:paramtypes", [Number]),
143
- __metadata("design:returntype", Promise)
144
- ], QueueController.prototype, "retry", null);
145
48
  QueueController = __decorate([
146
49
  (0, common_1.Controller)('api/admin/queue'),
147
50
  __metadata("design:paramtypes", [queue_service_1.QueueService, access_manager_1.AccessManager])
@@ -1 +1 @@
1
- {"version":3,"file":"queue.controller.js","sourceRoot":"","sources":["../../../src/platformUtility/controllers/queue.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6E;AAC7E,uEAAmE;AACnE,yEAAoE;AACpE,+EAA2E;AAC3E,6DAAyD;AAGlD,IAAM,eAAe,GAArB,MAAM,eAAe;IACxB,YAA6B,YAA0B,EAAmB,aAA4B;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CAAe"}
@@ -0,0 +1,3 @@
1
+ import { CommonAttributesDto } from './common.attributes.dto';
2
+ export declare class FailedBullJobAttributesDto extends CommonAttributesDto {
3
+ }
@@ -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,3 @@
1
+ import { CommonAttributesDto } from './common.attributes.dto';
2
+ export declare class PendingBullJobAttributesDto extends CommonAttributesDto {
3
+ }
@@ -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,2 @@
1
+ export * from './failed.bull.job.entity';
2
+ export * from './pending.bull.job.entity';
@@ -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"}
@@ -4,6 +4,7 @@ import { SqsWorkerCommand } from './commands/sqs.worker.command';
4
4
  import { SyncClassCommand } from './commands/sync.class.command';
5
5
  import { EventConsumer } from './consumers/event.consumer';
6
6
  import { JobConsumer } from './consumers/job.consumer';
7
+ import { BullJobController } from './controllers/bull.job.controller';
7
8
  import { QueueController } from './controllers/queue.controller';
8
9
  import { CommonAttributesDto } from './dtos/common.attributes.dto';
9
10
  import { FcmResponseDto } from './dtos/fcm.response.dto';
@@ -13,7 +14,11 @@ import { PushNotificationResponseDto } from './dtos/push.notification.response.d
13
14
  import { PushNotificationTemplateDto } from './dtos/push.notification.template.dto';
14
15
  import { QueueOptionsDto } from './dtos/queue.options.dto';
15
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';
16
20
  import { RecordWatcherJob } from './jobs/record.watcher.job';
21
+ import { ReloadPendingBullJob } from './jobs/reload.pending.bull.job';
17
22
  import { TestJob } from './jobs/test.job';
18
23
  import { CommonSqsPolling } from './libraries/common.sqs.polling';
19
24
  import { CreateEntityConstantsFile } from './libraries/create.entity.constants.file';
@@ -44,14 +49,15 @@ import { SqsService } from './services/sqs.service';
44
49
  import { StartupService } from './services/startup.service';
45
50
  import { BaseSubscriber } from './subscribers/base.subscriber';
46
51
  declare const es6Classes: {
47
- commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SqsWorkerCommand | typeof SyncClassCommand)[];
52
+ commands: (typeof EntityGeneratorCommand | typeof MaintenanceCommand | typeof SyncClassCommand | typeof SqsWorkerCommand)[];
48
53
  consumers: (typeof EventConsumer | typeof JobConsumer)[];
49
- controllers: (typeof QueueController)[];
50
- dtos: (typeof JobPayloadDto | typeof QueueOptionsDto | typeof RemoteRawResponseDto | typeof MailOptionsDto | typeof CommonAttributesDto | typeof FcmResponseDto | typeof PushNotificationResponseDto | typeof PushNotificationTemplateDto)[];
51
- jobs: (typeof RecordWatcherJob | typeof TestJob)[];
54
+ controllers: (typeof BullJobController | typeof QueueController)[];
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)[];
52
58
  libraries: (typeof FileSystemUtility | typeof CommonSqsPolling | typeof CreateEntityConstantsFile | typeof CreateEs6ClassesFile | typeof CreateEs6JobsFile | typeof CreateEs6ServiceFile | typeof CreateIndexFile | typeof ProcessCommonMail | typeof ProcessPostmarkMail | typeof ProcessSmtpMail)[];
53
59
  middlewares: (typeof MaintenanceMiddleware | typeof TrimPipe)[];
54
- services: (typeof RemoteRequestService | typeof CacheService | typeof SqlService | typeof MaintenanceService | typeof ShutdownService | typeof DynamoService | typeof AuditService | typeof Es6JobsService | typeof FcmNotificationService | typeof MailService | typeof StartupService | typeof Es6Service | typeof SqsService | typeof LocalPropertyService | typeof QueueService)[];
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)[];
55
61
  subscribers: (typeof BaseSubscriber)[];
56
62
  };
57
63
  export default es6Classes;
@@ -6,16 +6,23 @@ const sqs_worker_command_1 = require("./commands/sqs.worker.command");
6
6
  const sync_class_command_1 = require("./commands/sync.class.command");
7
7
  const event_consumer_1 = require("./consumers/event.consumer");
8
8
  const job_consumer_1 = require("./consumers/job.consumer");
9
+ const bull_job_controller_1 = require("./controllers/bull.job.controller");
9
10
  const queue_controller_1 = require("./controllers/queue.controller");
10
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");
11
13
  const fcm_response_dto_1 = require("./dtos/fcm.response.dto");
12
14
  const job_payload_dto_1 = require("./dtos/job.payload.dto");
13
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");
14
17
  const push_notification_response_dto_1 = require("./dtos/push.notification.response.dto");
15
18
  const push_notification_template_dto_1 = require("./dtos/push.notification.template.dto");
16
19
  const queue_options_dto_1 = require("./dtos/queue.options.dto");
17
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");
18
24
  const record_watcher_job_1 = require("./jobs/record.watcher.job");
25
+ const reload_pending_bull_job_1 = require("./jobs/reload.pending.bull.job");
19
26
  const test_job_1 = require("./jobs/test.job");
20
27
  const common_sqs_polling_1 = require("./libraries/common.sqs.polling");
21
28
  const create_entity_constants_file_1 = require("./libraries/create.entity.constants.file");
@@ -48,18 +55,21 @@ const base_subscriber_1 = require("./subscribers/base.subscriber");
48
55
  const es6Classes = {
49
56
  commands: [entity_generator_command_1.EntityGeneratorCommand, maintenance_command_1.MaintenanceCommand, sqs_worker_command_1.SqsWorkerCommand, sync_class_command_1.SyncClassCommand],
50
57
  consumers: [event_consumer_1.EventConsumer, job_consumer_1.JobConsumer],
51
- controllers: [queue_controller_1.QueueController],
58
+ controllers: [bull_job_controller_1.BullJobController, queue_controller_1.QueueController],
52
59
  dtos: [
53
60
  common_attributes_dto_1.CommonAttributesDto,
61
+ failed_bull_job_attributes_dto_1.FailedBullJobAttributesDto,
54
62
  fcm_response_dto_1.FcmResponseDto,
55
63
  job_payload_dto_1.JobPayloadDto,
56
64
  mail_options_dto_1.MailOptionsDto,
65
+ pending_bull_job_attributes_dto_1.PendingBullJobAttributesDto,
57
66
  push_notification_response_dto_1.PushNotificationResponseDto,
58
67
  push_notification_template_dto_1.PushNotificationTemplateDto,
59
68
  queue_options_dto_1.QueueOptionsDto,
60
69
  remote_raw_response_dto_1.RemoteRawResponseDto,
61
70
  ],
62
- jobs: [record_watcher_job_1.RecordWatcherJob, test_job_1.TestJob],
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],
63
73
  libraries: [
64
74
  common_sqs_polling_1.CommonSqsPolling,
65
75
  create_entity_constants_file_1.CreateEntityConstantsFile,