@servicelabsco/nestjs-utility-services 1.2.108 → 1.2.110
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/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/config/source.hash.d.ts +2 -0
- package/dist/config/source.hash.js +2 -0
- package/dist/config/source.hash.js.map +1 -1
- package/dist/migrations/1734632235444-CreateRecurringQueryTable.d.ts +5 -0
- package/dist/migrations/1734632235444-CreateRecurringQueryTable.js +22 -0
- package/dist/migrations/1734632235444-CreateRecurringQueryTable.js.map +1 -0
- package/dist/migrations/1734941912633-CreateDataLogTable.d.ts +5 -0
- package/dist/migrations/1734941912633-CreateDataLogTable.js +19 -0
- package/dist/migrations/1734941912633-CreateDataLogTable.js.map +1 -0
- package/dist/system/dtos/data.log.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/data.log.attributes.dto.js +8 -0
- package/dist/system/dtos/data.log.attributes.dto.js.map +1 -0
- package/dist/system/dtos/index.d.ts +2 -0
- package/dist/system/dtos/index.js +2 -0
- package/dist/system/dtos/index.js.map +1 -1
- package/dist/system/dtos/recurring.query.attributes.dto.d.ts +3 -0
- package/dist/system/dtos/recurring.query.attributes.dto.js +8 -0
- package/dist/system/dtos/recurring.query.attributes.dto.js.map +1 -0
- package/dist/system/entities/data.log.entity.d.ts +8 -0
- package/dist/system/entities/data.log.entity.js +38 -0
- package/dist/system/entities/data.log.entity.js.map +1 -0
- package/dist/system/entities/index.d.ts +2 -0
- package/dist/system/entities/index.js +2 -0
- package/dist/system/entities/index.js.map +1 -1
- package/dist/system/entities/recurring.query.entity.d.ts +10 -0
- package/dist/system/entities/recurring.query.entity.js +46 -0
- package/dist/system/entities/recurring.query.entity.js.map +1 -0
- package/dist/system/es6.classes.d.ts +11 -4
- package/dist/system/es6.classes.js +20 -2
- package/dist/system/es6.classes.js.map +1 -1
- package/dist/system/jobs/data.log.job.d.ts +9 -0
- package/dist/system/jobs/data.log.job.js +30 -0
- package/dist/system/jobs/data.log.job.js.map +1 -0
- package/dist/system/jobs/execute.recurring.query.job.d.ts +10 -0
- package/dist/system/jobs/{clean.scheduled.event.job.js → execute.recurring.query.job.js} +19 -16
- package/dist/system/jobs/execute.recurring.query.job.js.map +1 -0
- package/dist/system/jobs/index.d.ts +4 -1
- package/dist/system/jobs/index.js +4 -1
- package/dist/system/jobs/index.js.map +1 -1
- package/dist/system/jobs/recurring.query.job.d.ts +15 -0
- package/dist/system/jobs/recurring.query.job.js +52 -0
- package/dist/system/jobs/recurring.query.job.js.map +1 -0
- package/dist/system/jobs/scheduled.event.job.d.ts +3 -3
- package/dist/system/jobs/scheduled.event.job.js +14 -12
- package/dist/system/jobs/scheduled.event.job.js.map +1 -1
- package/dist/system/jobs/{clean.scheduled.event.job.d.ts → set.recurring.query.event.job.d.ts} +8 -5
- package/dist/system/jobs/set.recurring.query.event.job.js +81 -0
- package/dist/system/jobs/set.recurring.query.event.job.js.map +1 -0
- package/dist/system/jobs/set.scheduled.event.job.d.ts +3 -0
- package/dist/system/jobs/set.scheduled.event.job.js +42 -2
- package/dist/system/jobs/set.scheduled.event.job.js.map +1 -1
- package/dist/system/libraries/code.evaluator.d.ts +2 -2
- package/dist/system/libraries/code.evaluator.js.map +1 -1
- package/dist/system/services/es6.jobs.service.d.ts +9 -3
- package/dist/system/services/es6.jobs.service.js +18 -6
- package/dist/system/services/es6.jobs.service.js.map +1 -1
- package/dist/system/services/scheduled.event.service.d.ts +4 -6
- package/dist/system/services/scheduled.event.service.js +21 -58
- package/dist/system/services/scheduled.event.service.js.map +1 -1
- package/dist/system/subscribers/data.log.subscriber.d.ts +10 -0
- package/dist/system/subscribers/data.log.subscriber.js +34 -0
- package/dist/system/subscribers/data.log.subscriber.js.map +1 -0
- package/dist/system/subscribers/index.d.ts +2 -0
- package/dist/system/subscribers/index.js +2 -0
- package/dist/system/subscribers/index.js.map +1 -1
- package/dist/system/subscribers/recurring.query.subscriber.d.ts +12 -0
- package/dist/system/subscribers/recurring.query.subscriber.js +47 -0
- package/dist/system/subscribers/recurring.query.subscriber.js.map +1 -0
- package/dist/system/subscribers/scheduled.event.subscriber.d.ts +2 -1
- package/dist/system/subscribers/scheduled.event.subscriber.js +7 -0
- package/dist/system/subscribers/scheduled.event.subscriber.js.map +1 -1
- package/package.json +1 -1
- package/dist/system/jobs/clean.scheduled.event.job.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"set.recurring.query.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/set.recurring.query.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uCAA4D;AAC5D,qCAAuD;AACvD,kEAA8D;AAC9D,gFAA4E;AAC5E,yEAAoE;AACpE,uEAAkE;AAClE,+EAA0E;AAC1E,iFAA4E;AAC5E,uDAAwD;AAGjD,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,sBAAS;IAGpD,YACuB,YAA0B,EAC5B,qBAA4C;QAE7D,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,0BAAqB,GAArB,qBAAqB,CAAuB;QAJvD,YAAO,GAAW,MAAM,CAAC;IAOnC,CAAC;IAMD,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACtC,CAAC;IAQO,KAAK,CAAC,mBAAmB;QAC7B,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,MAAM,uCAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAEzG,MAAM,SAAS,GAAG,IAAA,qBAAU,EAAC,IAAI,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;QAC5C,MAAM,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C,WAAW,CAAC,GAAyB,EAAE,IAAU,EAAE,KAAwB;QACrF,MAAM,MAAM,GAAG,IAAI,qCAAgB,EAAE,CAAC;QAEtC,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACzB,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE,CAAC;QAE3B,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC;QAEnC,MAAM,CAAC,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC;QAC/C,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,CAAC;QAE1B,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEpB,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AArGY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAK4B,4BAAY;QACL,+CAAqB;GALxD,yBAAyB,CAqGrC"}
|
@@ -8,4 +8,7 @@ export declare class SetScheduledEventJob extends CommonJob {
|
|
8
8
|
constructor(queueService: QueueService, scheduledEventService: ScheduledEventService);
|
9
9
|
handle(): Promise<void>;
|
10
10
|
private handleAllActiveJobs;
|
11
|
+
private handleJob;
|
12
|
+
private getEligibleScheduledEvents;
|
13
|
+
private setNewEvent;
|
11
14
|
}
|
@@ -11,9 +11,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.SetScheduledEventJob = void 0;
|
13
13
|
const common_1 = require("@nestjs/common");
|
14
|
+
const date_fns_1 = require("date-fns");
|
15
|
+
const typeorm_1 = require("typeorm");
|
14
16
|
const common_job_1 = require("../../common/libraries/common.job");
|
17
|
+
const date_util_1 = require("../../common/libraries/date.util");
|
15
18
|
const queue_service_1 = require("../../platformUtility/services/queue.service");
|
19
|
+
const event_queue_entity_1 = require("../entities/event.queue.entity");
|
20
|
+
const scheduled_event_entity_1 = require("../entities/scheduled.event.entity");
|
16
21
|
const scheduled_event_service_1 = require("../services/scheduled.event.service");
|
22
|
+
const SourceHash = require("../../config/source.hash");
|
17
23
|
let SetScheduledEventJob = class SetScheduledEventJob extends common_job_1.CommonJob {
|
18
24
|
constructor(queueService, scheduledEventService) {
|
19
25
|
super('40d4fd2c9c09856b54d90643c5f03171');
|
@@ -25,11 +31,45 @@ let SetScheduledEventJob = class SetScheduledEventJob extends common_job_1.Commo
|
|
25
31
|
return this.handleAllActiveJobs();
|
26
32
|
}
|
27
33
|
async handleAllActiveJobs() {
|
28
|
-
const scheduledJobs = await this.
|
34
|
+
const scheduledJobs = await this.getEligibleScheduledEvents();
|
29
35
|
for (const scheduledJob of scheduledJobs) {
|
30
|
-
await this.
|
36
|
+
await this.handleJob(scheduledJob);
|
31
37
|
}
|
32
38
|
}
|
39
|
+
async handleJob(job) {
|
40
|
+
const source = { source_type: SourceHash.scheduledEvent, source_id: job.id };
|
41
|
+
const dates = await this.scheduledEventService.getSchedules(source, job.timing, job.start_time, job.end_time);
|
42
|
+
if (!dates?.length)
|
43
|
+
return job;
|
44
|
+
for (const date of dates) {
|
45
|
+
await this.setNewEvent(job, date);
|
46
|
+
}
|
47
|
+
job.last_scheduled_time = dates.pop();
|
48
|
+
return job.save();
|
49
|
+
}
|
50
|
+
async getEligibleScheduledEvents() {
|
51
|
+
const d = (0, date_fns_1.addMinutes)(new Date(), 15);
|
52
|
+
return scheduled_event_entity_1.ScheduledEventEntity.find({
|
53
|
+
relations: ['event'],
|
54
|
+
where: {
|
55
|
+
active: true,
|
56
|
+
end_time: (0, typeorm_1.Not)((0, typeorm_1.LessThan)(date_util_1.DateUtil.getDateTime())),
|
57
|
+
last_scheduled_time: (0, typeorm_1.LessThanOrEqual)(d),
|
58
|
+
},
|
59
|
+
});
|
60
|
+
}
|
61
|
+
async setNewEvent(job, date) {
|
62
|
+
const record = new event_queue_entity_1.EventQueueEntity();
|
63
|
+
record.name = job.event.name;
|
64
|
+
record.event_id = job.event_id;
|
65
|
+
record.parameter = job.parameter;
|
66
|
+
record.payload = job.payload || {};
|
67
|
+
record.scheduled_start_time = date;
|
68
|
+
record.source_type = SourceHash.scheduledEvent;
|
69
|
+
record.source_id = job.id;
|
70
|
+
await record.save();
|
71
|
+
return record;
|
72
|
+
}
|
33
73
|
};
|
34
74
|
exports.SetScheduledEventJob = SetScheduledEventJob;
|
35
75
|
exports.SetScheduledEventJob = SetScheduledEventJob = __decorate([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"set.scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/set.scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,gFAA4E;AAC5E,iFAA4E;
|
1
|
+
{"version":3,"file":"set.scheduled.event.job.js","sourceRoot":"","sources":["../../../src/system/jobs/set.scheduled.event.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uCAAsC;AACtC,qCAAyD;AACzD,kEAA8D;AAC9D,gEAA4D;AAC5D,gFAA4E;AAC5E,uEAAkE;AAClE,+EAA0E;AAC1E,iFAA4E;AAC5E,uDAAwD;AAGjD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,sBAAS;IAG/C,YACuB,YAA0B,EAC5B,qBAA4C;QAE7D,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC5B,0BAAqB,GAArB,qBAAqB,CAAuB;QAJvD,YAAO,GAAW,MAAM,CAAC;IAOnC,CAAC;IAMD,KAAK,CAAC,MAAM;QACR,OAAO,IAAI,CAAC,mBAAmB,EAAE,CAAC;IACtC,CAAC;IAQO,KAAK,CAAC,mBAAmB;QAC7B,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAE9D,KAAK,MAAM,YAAY,IAAI,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MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;QAC7B,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAE/B,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;QACjC,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QACnC,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC;QAEnC,MAAM,CAAC,WAAW,GAAG,UAAU,CAAC,cAAc,CAAC;QAC/C,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC,EAAE,CAAC;QAE1B,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEpB,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAlGY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAK4B,4BAAY;QACL,+CAAqB;GALxD,oBAAoB,CAkGhC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"code.evaluator.js","sourceRoot":"","sources":["../../../src/system/libraries/code.evaluator.ts"],"names":[],"mappings":";;;AAAA,8EAA0E;AAE1E,MAAa,aAAa;IAQtB,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,
|
1
|
+
{"version":3,"file":"code.evaluator.js","sourceRoot":"","sources":["../../../src/system/libraries/code.evaluator.ts"],"names":[],"mappings":";;;AAAA,8EAA0E;AAE1E,MAAa,aAAa;IAQtB,KAAK,CAAC,OAAO,CAAC,MAAc,EAAE,OAAiC;QAC3D,MAAM,EAAE,GAAG,IAAI,CAAC;QAChB,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,CAAC;QAC3B,MAAM,GAAG,GAAG,OAAO,EAAE,EAAE,CAAC;QAExB,MAAM,IAAI,GAAG;;kBAEH,MAAM;;SAEf,CAAC;QAEF,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IAQO,SAAS,CAAC,UAAkB;QAChC,OAAO,kCAAe,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAQO,UAAU,CAAC,UAAkB;QACjC,OAAO,kCAAe,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;IAUO,KAAK,CAAC,WAAW,CAAC,UAAkB,EAAE,IAAS,EAAE,QAAgB,CAAC;QACtE,MAAM,GAAG,GAAG,kCAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,OAAO,CAAC,GAAG,CAAC,aAAa,UAAU,YAAY,CAAC,CAAC;YACjD,OAAO;QACX,CAAC;QAED,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACzC,CAAC;CACJ;AA3DD,sCA2DC"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { CleanScheduledEventJob } from '../jobs/clean.scheduled.event.job';
|
2
1
|
import { ClientCredentialJob } from '../jobs/client.credential.job';
|
3
2
|
import { ClientJob } from '../jobs/client.job';
|
4
3
|
import { CodeFixLogJob } from '../jobs/code.fix.log.job';
|
@@ -6,19 +5,23 @@ import { CodeFixScriptJob } from '../jobs/code.fix.script.job';
|
|
6
5
|
import { ColumnMapperJob } from '../jobs/column.mapper.job';
|
7
6
|
import { CommentJob } from '../jobs/comment.job';
|
8
7
|
import { CredentialIpJob } from '../jobs/credential.ip.job';
|
8
|
+
import { DataLogJob } from '../jobs/data.log.job';
|
9
9
|
import { DocumentJob } from '../jobs/document.job';
|
10
10
|
import { ExecuteCodeFixJob } from '../jobs/execute.code.fix.job';
|
11
|
+
import { ExecuteRecurringQueryJob } from '../jobs/execute.recurring.query.job';
|
11
12
|
import { MailEventJob } from '../jobs/mail.event.job';
|
12
13
|
import { MailRecipientJob } from '../jobs/mail.recipient.job';
|
13
14
|
import { MailValidationJob } from '../jobs/mail.validation.job';
|
14
15
|
import { MobileValidationJob } from '../jobs/mobile.validation.job';
|
15
16
|
import { ModelScannerJob } from '../jobs/model.scanner.job';
|
16
17
|
import { PropertyJob } from '../jobs/property.job';
|
18
|
+
import { RecurringQueryJob } from '../jobs/recurring.query.job';
|
17
19
|
import { RefreshPropertyCacheJob } from '../jobs/refresh.property.cache.job';
|
18
20
|
import { RelationshipMapperJob } from '../jobs/relationship.mapper.job';
|
19
21
|
import { ReportColumnSyncJob } from '../jobs/report.column.sync.job';
|
20
22
|
import { ScheduledEventJob } from '../jobs/scheduled.event.job';
|
21
23
|
import { SetEventQueueJob } from '../jobs/set.event.queue.job';
|
24
|
+
import { SetRecurringQueryEventJob } from '../jobs/set.recurring.query.event.job';
|
22
25
|
import { SetScheduledEventJob } from '../jobs/set.scheduled.event.job';
|
23
26
|
import { SmsMessageJob } from '../jobs/sms.message.job';
|
24
27
|
import { SqsPollingJob } from '../jobs/sqs.polling.job';
|
@@ -27,7 +30,6 @@ import { UserGroupMemberJob } from '../jobs/user.group.member.job';
|
|
27
30
|
import { UserGroupPermissionJob } from '../jobs/user.group.permission.job';
|
28
31
|
import { UserGroupRoleJob } from '../jobs/user.group.role.job';
|
29
32
|
export declare class Es6JobsService {
|
30
|
-
private readonly cleanScheduledEventJob;
|
31
33
|
private readonly clientCredentialJob;
|
32
34
|
private readonly clientJob;
|
33
35
|
private readonly codeFixLogJob;
|
@@ -35,19 +37,23 @@ export declare class Es6JobsService {
|
|
35
37
|
private readonly columnMapperJob;
|
36
38
|
private readonly commentJob;
|
37
39
|
private readonly credentialIpJob;
|
40
|
+
private readonly dataLogJob;
|
38
41
|
private readonly documentJob;
|
39
42
|
private readonly executeCodeFixJob;
|
43
|
+
private readonly executeRecurringQueryJob;
|
40
44
|
private readonly mailEventJob;
|
41
45
|
private readonly mailRecipientJob;
|
42
46
|
private readonly mailValidationJob;
|
43
47
|
private readonly mobileValidationJob;
|
44
48
|
private readonly modelScannerJob;
|
45
49
|
private readonly propertyJob;
|
50
|
+
private readonly recurringQueryJob;
|
46
51
|
private readonly refreshPropertyCacheJob;
|
47
52
|
private readonly relationshipMapperJob;
|
48
53
|
private readonly reportColumnSyncJob;
|
49
54
|
private readonly scheduledEventJob;
|
50
55
|
private readonly setEventQueueJob;
|
56
|
+
private readonly setRecurringQueryEventJob;
|
51
57
|
private readonly setScheduledEventJob;
|
52
58
|
private readonly smsMessageJob;
|
53
59
|
private readonly sqsPollingJob;
|
@@ -56,7 +62,7 @@ export declare class Es6JobsService {
|
|
56
62
|
private readonly userGroupPermissionJob;
|
57
63
|
private readonly userGroupRoleJob;
|
58
64
|
private jobs;
|
59
|
-
constructor(
|
65
|
+
constructor(clientCredentialJob: ClientCredentialJob, clientJob: ClientJob, codeFixLogJob: CodeFixLogJob, codeFixScriptJob: CodeFixScriptJob, columnMapperJob: ColumnMapperJob, commentJob: CommentJob, credentialIpJob: CredentialIpJob, dataLogJob: DataLogJob, documentJob: DocumentJob, executeCodeFixJob: ExecuteCodeFixJob, executeRecurringQueryJob: ExecuteRecurringQueryJob, mailEventJob: MailEventJob, mailRecipientJob: MailRecipientJob, mailValidationJob: MailValidationJob, mobileValidationJob: MobileValidationJob, modelScannerJob: ModelScannerJob, propertyJob: PropertyJob, recurringQueryJob: RecurringQueryJob, refreshPropertyCacheJob: RefreshPropertyCacheJob, relationshipMapperJob: RelationshipMapperJob, reportColumnSyncJob: ReportColumnSyncJob, scheduledEventJob: ScheduledEventJob, setEventQueueJob: SetEventQueueJob, setRecurringQueryEventJob: SetRecurringQueryEventJob, setScheduledEventJob: SetScheduledEventJob, smsMessageJob: SmsMessageJob, sqsPollingJob: SqsPollingJob, syncAllCodeJob: SyncAllCodeJob, userGroupMemberJob: UserGroupMemberJob, userGroupPermissionJob: UserGroupPermissionJob, userGroupRoleJob: UserGroupRoleJob);
|
60
66
|
alignJobs(): void;
|
61
67
|
setJobs(): void;
|
62
68
|
}
|
@@ -11,7 +11,6 @@ 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 clean_scheduled_event_job_1 = require("../jobs/clean.scheduled.event.job");
|
15
14
|
const client_credential_job_1 = require("../jobs/client.credential.job");
|
16
15
|
const client_job_1 = require("../jobs/client.job");
|
17
16
|
const code_fix_log_job_1 = require("../jobs/code.fix.log.job");
|
@@ -19,19 +18,23 @@ const code_fix_script_job_1 = require("../jobs/code.fix.script.job");
|
|
19
18
|
const column_mapper_job_1 = require("../jobs/column.mapper.job");
|
20
19
|
const comment_job_1 = require("../jobs/comment.job");
|
21
20
|
const credential_ip_job_1 = require("../jobs/credential.ip.job");
|
21
|
+
const data_log_job_1 = require("../jobs/data.log.job");
|
22
22
|
const document_job_1 = require("../jobs/document.job");
|
23
23
|
const execute_code_fix_job_1 = require("../jobs/execute.code.fix.job");
|
24
|
+
const execute_recurring_query_job_1 = require("../jobs/execute.recurring.query.job");
|
24
25
|
const mail_event_job_1 = require("../jobs/mail.event.job");
|
25
26
|
const mail_recipient_job_1 = require("../jobs/mail.recipient.job");
|
26
27
|
const mail_validation_job_1 = require("../jobs/mail.validation.job");
|
27
28
|
const mobile_validation_job_1 = require("../jobs/mobile.validation.job");
|
28
29
|
const model_scanner_job_1 = require("../jobs/model.scanner.job");
|
29
30
|
const property_job_1 = require("../jobs/property.job");
|
31
|
+
const recurring_query_job_1 = require("../jobs/recurring.query.job");
|
30
32
|
const refresh_property_cache_job_1 = require("../jobs/refresh.property.cache.job");
|
31
33
|
const relationship_mapper_job_1 = require("../jobs/relationship.mapper.job");
|
32
34
|
const report_column_sync_job_1 = require("../jobs/report.column.sync.job");
|
33
35
|
const scheduled_event_job_1 = require("../jobs/scheduled.event.job");
|
34
36
|
const set_event_queue_job_1 = require("../jobs/set.event.queue.job");
|
37
|
+
const set_recurring_query_event_job_1 = require("../jobs/set.recurring.query.event.job");
|
35
38
|
const set_scheduled_event_job_1 = require("../jobs/set.scheduled.event.job");
|
36
39
|
const sms_message_job_1 = require("../jobs/sms.message.job");
|
37
40
|
const sqs_polling_job_1 = require("../jobs/sqs.polling.job");
|
@@ -41,8 +44,7 @@ const user_group_permission_job_1 = require("../jobs/user.group.permission.job")
|
|
41
44
|
const user_group_role_job_1 = require("../jobs/user.group.role.job");
|
42
45
|
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
43
46
|
let Es6JobsService = class Es6JobsService {
|
44
|
-
constructor(
|
45
|
-
this.cleanScheduledEventJob = cleanScheduledEventJob;
|
47
|
+
constructor(clientCredentialJob, clientJob, codeFixLogJob, codeFixScriptJob, columnMapperJob, commentJob, credentialIpJob, dataLogJob, documentJob, executeCodeFixJob, executeRecurringQueryJob, mailEventJob, mailRecipientJob, mailValidationJob, mobileValidationJob, modelScannerJob, propertyJob, recurringQueryJob, refreshPropertyCacheJob, relationshipMapperJob, reportColumnSyncJob, scheduledEventJob, setEventQueueJob, setRecurringQueryEventJob, setScheduledEventJob, smsMessageJob, sqsPollingJob, syncAllCodeJob, userGroupMemberJob, userGroupPermissionJob, userGroupRoleJob) {
|
46
48
|
this.clientCredentialJob = clientCredentialJob;
|
47
49
|
this.clientJob = clientJob;
|
48
50
|
this.codeFixLogJob = codeFixLogJob;
|
@@ -50,19 +52,23 @@ let Es6JobsService = class Es6JobsService {
|
|
50
52
|
this.columnMapperJob = columnMapperJob;
|
51
53
|
this.commentJob = commentJob;
|
52
54
|
this.credentialIpJob = credentialIpJob;
|
55
|
+
this.dataLogJob = dataLogJob;
|
53
56
|
this.documentJob = documentJob;
|
54
57
|
this.executeCodeFixJob = executeCodeFixJob;
|
58
|
+
this.executeRecurringQueryJob = executeRecurringQueryJob;
|
55
59
|
this.mailEventJob = mailEventJob;
|
56
60
|
this.mailRecipientJob = mailRecipientJob;
|
57
61
|
this.mailValidationJob = mailValidationJob;
|
58
62
|
this.mobileValidationJob = mobileValidationJob;
|
59
63
|
this.modelScannerJob = modelScannerJob;
|
60
64
|
this.propertyJob = propertyJob;
|
65
|
+
this.recurringQueryJob = recurringQueryJob;
|
61
66
|
this.refreshPropertyCacheJob = refreshPropertyCacheJob;
|
62
67
|
this.relationshipMapperJob = relationshipMapperJob;
|
63
68
|
this.reportColumnSyncJob = reportColumnSyncJob;
|
64
69
|
this.scheduledEventJob = scheduledEventJob;
|
65
70
|
this.setEventQueueJob = setEventQueueJob;
|
71
|
+
this.setRecurringQueryEventJob = setRecurringQueryEventJob;
|
66
72
|
this.setScheduledEventJob = setScheduledEventJob;
|
67
73
|
this.smsMessageJob = smsMessageJob;
|
68
74
|
this.sqsPollingJob = sqsPollingJob;
|
@@ -76,7 +82,6 @@ let Es6JobsService = class Es6JobsService {
|
|
76
82
|
}
|
77
83
|
alignJobs() {
|
78
84
|
this.jobs = {
|
79
|
-
'6ca64f0c0b9d1a082aa5e0182020ba5b': this.cleanScheduledEventJob,
|
80
85
|
'9eb95214fbbb66f7c32576de46c95d60': this.clientCredentialJob,
|
81
86
|
aec3ee6a7bb90aef7b99e2289f7c22d6: this.clientJob,
|
82
87
|
'22f3e204e242b61c405ded5eb2825441': this.codeFixLogJob,
|
@@ -84,19 +89,23 @@ let Es6JobsService = class Es6JobsService {
|
|
84
89
|
'7f6866a3bd3e6ab3f493425ed2f5cf2a': this.columnMapperJob,
|
85
90
|
b573ba7362b8f4b0da4483dfaaa73b25: this.commentJob,
|
86
91
|
d14e1d233ff74f0c86d160cc3ec9cbfb: this.credentialIpJob,
|
92
|
+
f8f29249c92f1efce56fc05f343d915f: this.dataLogJob,
|
87
93
|
'64c1bbde8bd1bc6355f8fa2d86a171f1': this.documentJob,
|
88
94
|
'66b85ebd2f93d8d9ad74f91dd448fc10': this.executeCodeFixJob,
|
95
|
+
'49da21b3b3be45f66e8f88c55be55ebe': this.executeRecurringQueryJob,
|
89
96
|
'5cfb77227fad03adc54decf4465d2673': this.mailEventJob,
|
90
97
|
'97aad20762421f5972396cc09411f139': this.mailRecipientJob,
|
91
98
|
'469fd6148687123ec4ef17ed0ad5ef87': this.mailValidationJob,
|
92
99
|
fc454d05d19747fdbb8510bbc00f67dd: this.mobileValidationJob,
|
93
100
|
'895d52ea29c17047f690ead67db80c9c': this.modelScannerJob,
|
94
101
|
'5b02b9f5e3aad0a0dbc8982119ced400': this.propertyJob,
|
102
|
+
'0a4afb675c0a9e20782a12f7f6e870c2': this.recurringQueryJob,
|
95
103
|
b7d57d912c9514786071e4e4e804db13: this.refreshPropertyCacheJob,
|
96
104
|
'64724c02cc076f23566976dc765eb6b6': this.relationshipMapperJob,
|
97
105
|
'7676ffc477bc85ccfd8418b70f2377c9': this.reportColumnSyncJob,
|
98
106
|
bb97644f2c505dc135d01f4c6959ec1f: this.scheduledEventJob,
|
99
107
|
eedbbd37e8ca956ab13f24b5028aaa83: this.setEventQueueJob,
|
108
|
+
'6f2c6980763ef0de2b4b7ee850319f6b': this.setRecurringQueryEventJob,
|
100
109
|
'40d4fd2c9c09856b54d90643c5f03171': this.setScheduledEventJob,
|
101
110
|
'568a28e3b79c7a722c9ec0d0b55515c6': this.smsMessageJob,
|
102
111
|
'844b338ab982fd3e1cf1cea14cfc361d': this.sqsPollingJob,
|
@@ -113,27 +122,30 @@ let Es6JobsService = class Es6JobsService {
|
|
113
122
|
exports.Es6JobsService = Es6JobsService;
|
114
123
|
exports.Es6JobsService = Es6JobsService = __decorate([
|
115
124
|
(0, common_1.Injectable)(),
|
116
|
-
__metadata("design:paramtypes", [
|
117
|
-
client_credential_job_1.ClientCredentialJob,
|
125
|
+
__metadata("design:paramtypes", [client_credential_job_1.ClientCredentialJob,
|
118
126
|
client_job_1.ClientJob,
|
119
127
|
code_fix_log_job_1.CodeFixLogJob,
|
120
128
|
code_fix_script_job_1.CodeFixScriptJob,
|
121
129
|
column_mapper_job_1.ColumnMapperJob,
|
122
130
|
comment_job_1.CommentJob,
|
123
131
|
credential_ip_job_1.CredentialIpJob,
|
132
|
+
data_log_job_1.DataLogJob,
|
124
133
|
document_job_1.DocumentJob,
|
125
134
|
execute_code_fix_job_1.ExecuteCodeFixJob,
|
135
|
+
execute_recurring_query_job_1.ExecuteRecurringQueryJob,
|
126
136
|
mail_event_job_1.MailEventJob,
|
127
137
|
mail_recipient_job_1.MailRecipientJob,
|
128
138
|
mail_validation_job_1.MailValidationJob,
|
129
139
|
mobile_validation_job_1.MobileValidationJob,
|
130
140
|
model_scanner_job_1.ModelScannerJob,
|
131
141
|
property_job_1.PropertyJob,
|
142
|
+
recurring_query_job_1.RecurringQueryJob,
|
132
143
|
refresh_property_cache_job_1.RefreshPropertyCacheJob,
|
133
144
|
relationship_mapper_job_1.RelationshipMapperJob,
|
134
145
|
report_column_sync_job_1.ReportColumnSyncJob,
|
135
146
|
scheduled_event_job_1.ScheduledEventJob,
|
136
147
|
set_event_queue_job_1.SetEventQueueJob,
|
148
|
+
set_recurring_query_event_job_1.SetRecurringQueryEventJob,
|
137
149
|
set_scheduled_event_job_1.SetScheduledEventJob,
|
138
150
|
sms_message_job_1.SmsMessageJob,
|
139
151
|
sqs_polling_job_1.SqsPollingJob,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/system/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,
|
1
|
+
{"version":3,"file":"es6.jobs.service.js","sourceRoot":"","sources":["../../../src/system/services/es6.jobs.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yEAAoE;AACpE,mDAA+C;AAC/C,+DAAyD;AACzD,qEAA+D;AAC/D,iEAA4D;AAC5D,qDAAiD;AACjD,iEAA4D;AAC5D,uDAAkD;AAClD,uDAAmD;AACnD,uEAAiE;AACjE,qFAA+E;AAC/E,2DAAsD;AACtD,mEAA8D;AAC9D,qEAAgE;AAChE,yEAAoE;AACpE,iEAA4D;AAC5D,uDAAmD;AACnD,qEAAgE;AAChE,mFAA6E;AAC7E,6EAAwE;AACxE,2EAAqE;AACrE,qEAAgE;AAChE,qEAA+D;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;QAC5B,sCAAgB;GAlC9C,cAAc,CAuF1B"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { SourceColumnDto } from '../../platformUtility/dtos/source.column.dto';
|
1
2
|
import { SqlService } from '../../platformUtility/services/sql.service';
|
2
3
|
import { EventQueueEntity } from '../entities/event.queue.entity';
|
3
4
|
import { ScheduledEventEntity } from '../entities/scheduled.event.entity';
|
@@ -6,12 +7,9 @@ export declare class ScheduledEventService {
|
|
6
7
|
private readonly propertyService;
|
7
8
|
protected readonly sqlService: SqlService;
|
8
9
|
constructor(propertyService: PropertyService, sqlService: SqlService);
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
deleteActiveEvents(id: number): Promise<EventQueueEntity[]>;
|
13
|
-
setNewEvent(job: ScheduledEventEntity, scheduledTime: Date): Promise<EventQueueEntity>;
|
14
|
-
createEventsForJob(job: ScheduledEventEntity): Promise<ScheduledEventEntity>;
|
10
|
+
getActiveEventsSummary(source: SourceColumnDto): Promise<any>;
|
11
|
+
deleteActiveEvents(source: SourceColumnDto): Promise<EventQueueEntity[]>;
|
12
|
+
getSchedules(source: SourceColumnDto, timing: string, startDate: Date, endDate: Date): Promise<any[]>;
|
15
13
|
getActiveSchedules(): Promise<ScheduledEventEntity[]>;
|
16
14
|
private getScheduleStartTime;
|
17
15
|
private withTimezoneOffset;
|
@@ -19,96 +19,59 @@ const sql_service_1 = require("../../platformUtility/services/sql.service");
|
|
19
19
|
const event_queue_entity_1 = require("../entities/event.queue.entity");
|
20
20
|
const scheduled_event_entity_1 = require("../entities/scheduled.event.entity");
|
21
21
|
const property_service_1 = require("./property.service");
|
22
|
-
const SourceHash = require("../../config/source.hash");
|
23
22
|
let ScheduledEventService = class ScheduledEventService {
|
24
23
|
constructor(propertyService, sqlService) {
|
25
24
|
this.propertyService = propertyService;
|
26
25
|
this.sqlService = sqlService;
|
27
26
|
}
|
28
|
-
async
|
29
|
-
|
30
|
-
|
31
|
-
source_type: SourceHash.scheduledEvent,
|
32
|
-
source_id: id,
|
33
|
-
start_time: (0, typeorm_1.IsNull)(),
|
34
|
-
},
|
35
|
-
order: {
|
36
|
-
scheduled_start_time: 'ASC',
|
37
|
-
},
|
38
|
-
});
|
39
|
-
}
|
40
|
-
async getActiveEventsSummary(id) {
|
41
|
-
const sql = `select count(1) count, max(a.scheduled_start_time) scheduled_start_time from sys_event_queues a where a.deleted_at is null and a.start_time is null and a.source_type = '${SourceHash.scheduledEvent}' and a.source_id = ${id}`;
|
27
|
+
async getActiveEventsSummary(source) {
|
28
|
+
const { source_type, source_id } = source;
|
29
|
+
const sql = `select count(1) count, max(a.scheduled_start_time) scheduled_start_time from sys_event_queues a where a.deleted_at is null and a.start_time is null and a.source_type = '${source_type}' and a.source_id = ${source_id}`;
|
42
30
|
return this.sqlService.readFirst(sql);
|
43
31
|
}
|
44
|
-
async
|
45
|
-
|
46
|
-
where: {
|
47
|
-
source_type: SourceHash.scheduledEvent,
|
48
|
-
source_id: id,
|
49
|
-
start_time: (0, typeorm_1.Not)((0, typeorm_1.IsNull)()),
|
50
|
-
},
|
51
|
-
take: 10,
|
52
|
-
order: {
|
53
|
-
scheduled_start_time: 'DESC',
|
54
|
-
},
|
55
|
-
});
|
56
|
-
}
|
57
|
-
async deleteActiveEvents(id) {
|
32
|
+
async deleteActiveEvents(source) {
|
33
|
+
const { source_type, source_id } = source;
|
58
34
|
return event_queue_entity_1.EventQueueEntity.softDelete({
|
59
|
-
source_type
|
60
|
-
source_id
|
35
|
+
source_type,
|
36
|
+
source_id,
|
61
37
|
start_time: (0, typeorm_1.IsNull)(),
|
62
38
|
});
|
63
39
|
}
|
64
|
-
async
|
65
|
-
const record = new event_queue_entity_1.EventQueueEntity();
|
66
|
-
record.name = job.event.name;
|
67
|
-
record.event_id = job.event_id;
|
68
|
-
record.parameter = job.parameter;
|
69
|
-
record.payload = job.payload || {};
|
70
|
-
record.scheduled_start_time = scheduledTime;
|
71
|
-
record.source_type = SourceHash.scheduledEvent;
|
72
|
-
record.source_id = job.id;
|
73
|
-
await record.save();
|
74
|
-
return record;
|
75
|
-
}
|
76
|
-
async createEventsForJob(job) {
|
40
|
+
async getSchedules(source, timing, startDate, endDate) {
|
77
41
|
const now = new Date();
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
let inQueueCount = summary.count;
|
42
|
+
const dates = [];
|
43
|
+
const summary = await this.getActiveEventsSummary(source);
|
44
|
+
let inQueueCount = summary?.count || 0;
|
82
45
|
if (inQueueCount > 100)
|
83
|
-
return
|
46
|
+
return;
|
84
47
|
let lastRunTime = await this.getScheduleStartTime(summary);
|
85
|
-
lastRunTime = lastRunTime <
|
86
|
-
if (lastRunTime >
|
48
|
+
lastRunTime = lastRunTime < startDate ? startDate : lastRunTime;
|
49
|
+
if (lastRunTime > endDate)
|
87
50
|
return;
|
88
|
-
const nextTime = parser.parseExpression(
|
51
|
+
const nextTime = parser.parseExpression(timing, {
|
89
52
|
currentDate: lastRunTime,
|
90
|
-
endDate
|
53
|
+
endDate,
|
91
54
|
});
|
92
|
-
while (inQueueCount <=
|
55
|
+
while (inQueueCount <= 100) {
|
93
56
|
if (!nextTime.hasNext())
|
94
57
|
return;
|
95
58
|
const next = nextTime.next().toDate();
|
96
59
|
const date = await this.withTimezoneOffset(next);
|
60
|
+
dates.push(date);
|
97
61
|
if (date < now)
|
98
62
|
continue;
|
99
|
-
await this.setNewEvent(job, date);
|
100
|
-
job.last_scheduled_time = date;
|
101
63
|
++inQueueCount;
|
102
64
|
}
|
103
|
-
|
104
|
-
return job;
|
65
|
+
return dates;
|
105
66
|
}
|
106
67
|
async getActiveSchedules() {
|
68
|
+
const d = (0, date_fns_1.addMinutes)(new Date(), 15);
|
107
69
|
return scheduled_event_entity_1.ScheduledEventEntity.find({
|
108
70
|
relations: ['event'],
|
109
71
|
where: {
|
110
72
|
active: true,
|
111
73
|
end_time: (0, typeorm_1.Not)((0, typeorm_1.LessThan)(date_util_1.DateUtil.getDateTime())),
|
74
|
+
last_scheduled_time: (0, typeorm_1.LessThanOrEqual)(d),
|
112
75
|
},
|
113
76
|
});
|
114
77
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scheduled.event.service.js","sourceRoot":"","sources":["../../../src/system/services/scheduled.event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sCAAsC;AACtC,uCAAkD;AAClD,
|
1
|
+
{"version":3,"file":"scheduled.event.service.js","sourceRoot":"","sources":["../../../src/system/services/scheduled.event.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sCAAsC;AACtC,uCAAkD;AAClD,qCAAiE;AACjE,gEAA4D;AAE5D,4EAAwE;AACxE,uEAAkE;AAClE,+EAA0E;AAC1E,yDAAqD;AAS9C,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAM9B,YACqB,eAAgC,EAC9B,UAAsB;QADxB,oBAAe,GAAf,eAAe,CAAiB;QAC9B,eAAU,GAAV,UAAU,CAAY;IAC1C,CAAC;IAEJ,KAAK,CAAC,sBAAsB,CAAC,MAAuB;QAChD,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAE1C,MAAM,GAAG,GAAG,4KAA4K,WAAW,uBAAuB,SAAS,EAAE,CAAC;QAEtO,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC1C,CAAC;IAOD,KAAK,CAAC,kBAAkB,CAAC,MAAuB;QAC5C,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC1C,OAAO,qCAAgB,CAAC,UAAU,CAAC;YAC/B,WAAW;YACX,SAAS;YACT,UAAU,EAAE,IAAA,gBAAM,GAAE;SACvB,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAAuB,EAAE,MAAc,EAAE,SAAe,EAAE,OAAa;QACtF,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,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C,oBAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC/C,mBAAmB,EAAE,IAAA,yBAAe,EAAC,CAAC,CAAC;aAC1C;SACJ,CAAC,CAAC;IACP,CAAC;IASO,KAAK,CAAC,oBAAoB,CAAC,OAAY;QAC3C,IAAI,CAAC,OAAO,EAAE,oBAAoB;YAAE,OAAO,IAAI,IAAI,EAAE,CAAC;QAEtD,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;IAUO,KAAK,CAAC,kBAAkB,CAAC,IAAU;QACvC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAC;QAClF,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAEzB,OAAO,IAAA,qBAAU,EAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IASO,KAAK,CAAC,qBAAqB,CAAC,IAAU;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAC;QAClF,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAEzB,OAAO,IAAA,qBAAU,EAAC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACJ,CAAA;AAzIY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAQ6B,kCAAe;QAClB,wBAAU;GARpC,qBAAqB,CAyIjC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { DataSource } from 'typeorm';
|
2
|
+
import { DataLogEntity } from '../entities/data.log.entity';
|
3
|
+
import { DataLogJob } from '../jobs/data.log.job';
|
4
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
5
|
+
export declare class DataLogSubscriber extends CommonSubscriber<DataLogEntity> {
|
6
|
+
private readonly dataSource;
|
7
|
+
protected readonly entityJob: DataLogJob;
|
8
|
+
constructor(dataSource: DataSource, entityJob: DataLogJob);
|
9
|
+
listenTo(): typeof DataLogEntity;
|
10
|
+
}
|
@@ -0,0 +1,34 @@
|
|
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.DataLogSubscriber = void 0;
|
13
|
+
const typeorm_1 = require("typeorm");
|
14
|
+
const data_log_entity_1 = require("../entities/data.log.entity");
|
15
|
+
const data_log_job_1 = require("../jobs/data.log.job");
|
16
|
+
const common_subscriber_1 = require("../../common/libraries/common.subscriber");
|
17
|
+
let DataLogSubscriber = class DataLogSubscriber extends common_subscriber_1.CommonSubscriber {
|
18
|
+
constructor(dataSource, entityJob) {
|
19
|
+
super();
|
20
|
+
this.dataSource = dataSource;
|
21
|
+
this.entityJob = entityJob;
|
22
|
+
dataSource.subscribers.push(this);
|
23
|
+
}
|
24
|
+
listenTo() {
|
25
|
+
return data_log_entity_1.DataLogEntity;
|
26
|
+
}
|
27
|
+
};
|
28
|
+
exports.DataLogSubscriber = DataLogSubscriber;
|
29
|
+
exports.DataLogSubscriber = DataLogSubscriber = __decorate([
|
30
|
+
(0, typeorm_1.EventSubscriber)(),
|
31
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
32
|
+
data_log_job_1.DataLogJob])
|
33
|
+
], DataLogSubscriber);
|
34
|
+
//# sourceMappingURL=data.log.subscriber.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"data.log.subscriber.js","sourceRoot":"","sources":["../../../src/system/subscribers/data.log.subscriber.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgF;AAChF,iEAA4D;AAC5D,uDAAkD;AAClD,gFAA4E;AAGrE,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,oCAA+B;IAClE,YACqB,UAAsB,EACpB,SAAqB;QAExC,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACpB,cAAS,GAAT,SAAS,CAAY;QAGxC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ;QACJ,OAAO,+BAAa,CAAC;IACzB,CAAC;CACJ,CAAA;AAXY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,yBAAe,GAAE;qCAGmB,oBAAU;QACT,yBAAU;GAHnC,iBAAiB,CAW7B"}
|
@@ -5,12 +5,14 @@ export * from './code.fix.script.subscriber';
|
|
5
5
|
export * from './column.subscriber';
|
6
6
|
export * from './comment.subscriber';
|
7
7
|
export * from './credential.ip.subscriber';
|
8
|
+
export * from './data.log.subscriber';
|
8
9
|
export * from './document.subscriber';
|
9
10
|
export * from './mail.event.subscriber';
|
10
11
|
export * from './mail.recipient.subscriber';
|
11
12
|
export * from './mail.validation.subscriber';
|
12
13
|
export * from './mobile.validation.subscriber';
|
13
14
|
export * from './property.subscriber';
|
15
|
+
export * from './recurring.query.subscriber';
|
14
16
|
export * from './relationship.subscriber';
|
15
17
|
export * from './scheduled.event.subscriber';
|
16
18
|
export * from './sms.message.subscriber';
|
@@ -21,12 +21,14 @@ __exportStar(require("./code.fix.script.subscriber"), exports);
|
|
21
21
|
__exportStar(require("./column.subscriber"), exports);
|
22
22
|
__exportStar(require("./comment.subscriber"), exports);
|
23
23
|
__exportStar(require("./credential.ip.subscriber"), exports);
|
24
|
+
__exportStar(require("./data.log.subscriber"), exports);
|
24
25
|
__exportStar(require("./document.subscriber"), exports);
|
25
26
|
__exportStar(require("./mail.event.subscriber"), exports);
|
26
27
|
__exportStar(require("./mail.recipient.subscriber"), exports);
|
27
28
|
__exportStar(require("./mail.validation.subscriber"), exports);
|
28
29
|
__exportStar(require("./mobile.validation.subscriber"), exports);
|
29
30
|
__exportStar(require("./property.subscriber"), exports);
|
31
|
+
__exportStar(require("./recurring.query.subscriber"), exports);
|
30
32
|
__exportStar(require("./relationship.subscriber"), exports);
|
31
33
|
__exportStar(require("./scheduled.event.subscriber"), exports);
|
32
34
|
__exportStar(require("./sms.message.subscriber"), exports);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAAA,sDAAoC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,sDAAoC;AAAA,uDAAqC;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,qEAAmD;AAAA,+DAA4C"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/subscribers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAAA,sDAAoC;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,sDAAoC;AAAA,uDAAqC;AAAA,6DAA2C;AAAA,wDAAsC;AAAA,wDAAsC;AAAA,0DAAwC;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,wDAAsC;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,+DAA6C;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,qEAAmD;AAAA,+DAA4C"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { DataSource, InsertEvent, UpdateEvent } from 'typeorm';
|
2
|
+
import { CommonSubscriber } from '../../common/libraries/common.subscriber';
|
3
|
+
import { RecurringQueryEntity } from '../entities/recurring.query.entity';
|
4
|
+
import { RecurringQueryJob } from '../jobs/recurring.query.job';
|
5
|
+
export declare class RecurringQuerySubscriber extends CommonSubscriber<RecurringQueryEntity> {
|
6
|
+
private readonly dataSource;
|
7
|
+
protected readonly entityJob: RecurringQueryJob;
|
8
|
+
constructor(dataSource: DataSource, entityJob: RecurringQueryJob);
|
9
|
+
listenTo(): typeof RecurringQueryEntity;
|
10
|
+
beforeInsert(event: InsertEvent<RecurringQueryEntity>): Promise<void>;
|
11
|
+
beforeUpdate(event: UpdateEvent<RecurringQueryEntity>): Promise<void>;
|
12
|
+
}
|