@volontariapp/post-processors 3.0.14 → 3.1.0-snap-2aefdbd
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/CHANGELOG.md +16 -0
- package/dist/common/job-outbox-failed.post-processor.d.ts +5 -5
- package/dist/common/job-outbox-failed.post-processor.d.ts.map +1 -1
- package/dist/common/job-outbox-failed.post-processor.js +84 -59
- package/dist/common/job-outbox-failed.post-processor.js.map +1 -1
- package/dist/common/job-outbox-success.post-processor.d.ts +5 -5
- package/dist/common/job-outbox-success.post-processor.d.ts.map +1 -1
- package/dist/common/job-outbox-success.post-processor.js +78 -55
- package/dist/common/job-outbox-success.post-processor.js.map +1 -1
- package/dist/test/utils/classes/test-job-outbox-failed.post-processor.class.d.ts +3 -2
- package/dist/test/utils/classes/test-job-outbox-failed.post-processor.class.d.ts.map +1 -1
- package/dist/test/utils/classes/test-job-outbox-failed.post-processor.class.js +2 -2
- package/dist/test/utils/classes/test-job-outbox-failed.post-processor.class.js.map +1 -1
- package/dist/test/utils/classes/test-job-outbox-success.post-processor.class.d.ts +3 -2
- package/dist/test/utils/classes/test-job-outbox-success.post-processor.class.d.ts.map +1 -1
- package/dist/test/utils/classes/test-job-outbox-success.post-processor.class.js +2 -2
- package/dist/test/utils/classes/test-job-outbox-success.post-processor.class.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- post-processors job outbox mode batch
|
|
8
|
+
|
|
9
|
+
## 3.0.15
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies []:
|
|
14
|
+
- @volontariapp/shared@0.8.0
|
|
15
|
+
- @volontariapp/database@3.3.15
|
|
16
|
+
- @volontariapp/messaging@2.9.1
|
|
17
|
+
- @volontariapp/outbox@0.9.33
|
|
18
|
+
|
|
3
19
|
## 3.0.14
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { PostProcessorOptions } from '../interfaces/index.js';
|
|
3
|
-
import { CommonEventMessagingType
|
|
1
|
+
import { BatchPostProcessor } from '../core/processors/batch.post-processor.js';
|
|
2
|
+
import type { PostProcessorOptions, BatchEventItem } from '../interfaces/index.js';
|
|
3
|
+
import { CommonEventMessagingType } from '@volontariapp/messaging';
|
|
4
4
|
import type { DataSource } from 'typeorm';
|
|
5
5
|
import type { Redis } from 'ioredis';
|
|
6
|
-
export declare class JobOutboxFailedPostProcessor extends
|
|
6
|
+
export declare class JobOutboxFailedPostProcessor extends BatchPostProcessor<CommonEventMessagingType.JOB_OUTBOX_FAILED> {
|
|
7
7
|
private readonly outboxRepository;
|
|
8
8
|
private readonly db;
|
|
9
9
|
constructor(db: DataSource, redisDriver: Redis, options: PostProcessorOptions);
|
|
10
10
|
protected shouldProcess(eventType: CommonEventMessagingType | string): boolean;
|
|
11
|
-
protected
|
|
11
|
+
protected processEvents(events: BatchEventItem<CommonEventMessagingType.JOB_OUTBOX_FAILED>[]): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=job-outbox-failed.post-processor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-outbox-failed.post-processor.d.ts","sourceRoot":"","sources":["../../src/common/job-outbox-failed.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"job-outbox-failed.post-processor.d.ts","sourceRoot":"","sources":["../../src/common/job-outbox-failed.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AASnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,qBAAa,4BAA6B,SAAQ,kBAAkB,CAAC,wBAAwB,CAAC,iBAAiB,CAAC;IAC9G,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IACxD,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAa;gBAEpB,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,oBAAoB;cAM1D,aAAa,CAAC,SAAS,EAAE,wBAAwB,GAAG,MAAM,GAAG,OAAO;cAIvE,aAAa,CAC3B,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,EAAE,GACnE,OAAO,CAAC,IAAI,CAAC;CAuHjB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommonEventMessagingType
|
|
1
|
+
import { BatchPostProcessor } from '../core/processors/batch.post-processor.js';
|
|
2
|
+
import { CommonEventMessagingType } from '@volontariapp/messaging';
|
|
3
3
|
import { JobsOutboxRepository, EventQueueWriter, EventQueueRepository } from '@volontariapp/outbox';
|
|
4
4
|
import { getEventForJob } from '@volontariapp/messaging';
|
|
5
5
|
import { EventQueueEntity, EventQueueModel, JobsOutboxModel, OutboxStatus, } from '@volontariapp/database';
|
|
6
6
|
import { Streams } from '@volontariapp/shared';
|
|
7
|
-
export class JobOutboxFailedPostProcessor extends
|
|
7
|
+
export class JobOutboxFailedPostProcessor extends BatchPostProcessor {
|
|
8
8
|
outboxRepository;
|
|
9
9
|
db;
|
|
10
10
|
constructor(db, redisDriver, options) {
|
|
@@ -15,73 +15,98 @@ export class JobOutboxFailedPostProcessor extends SinglePostProcessor {
|
|
|
15
15
|
shouldProcess(eventType) {
|
|
16
16
|
return eventType === CommonEventMessagingType.JOB_OUTBOX_FAILED.toString();
|
|
17
17
|
}
|
|
18
|
-
async
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.logger.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.logger.error(`Job with id ${jobId} does not exist in outbox`, { messageId, jobId });
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (entity.status === OutboxStatus.FAILED) {
|
|
33
|
-
this.logger.warn(`Job ${jobId} already marked as FAILED. Skipping to avoid duplicate events.`, { messageId, jobId });
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const originalPayload = entity.payload;
|
|
37
|
-
if (!jobType) {
|
|
38
|
-
this.logger.warn(`Missing jobType for job ${jobId}. Skipping feedback event.`, {
|
|
18
|
+
async processEvents(events) {
|
|
19
|
+
await Promise.all(events.map(async ({ event, messageId }) => {
|
|
20
|
+
const jobId = event.payload.after.job_id;
|
|
21
|
+
const jobType = event.payload.after.job_type;
|
|
22
|
+
const errorMessage = event.payload.after.error_message;
|
|
23
|
+
this.logger.info(`Starting processing of JOB_OUTBOX_FAILED for job ${String(jobId)}`, {
|
|
24
|
+
messageId,
|
|
25
|
+
jobId,
|
|
26
|
+
});
|
|
27
|
+
if (!jobId) {
|
|
28
|
+
this.logger.error('Received JOB_OUTBOX_FAILED but no job_id found in payload', {
|
|
39
29
|
messageId,
|
|
40
|
-
jobId,
|
|
41
30
|
});
|
|
31
|
+
return;
|
|
42
32
|
}
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
if (
|
|
46
|
-
this.logger.
|
|
33
|
+
try {
|
|
34
|
+
const entity = await this.outboxRepository.findById(jobId);
|
|
35
|
+
if (!entity) {
|
|
36
|
+
this.logger.error(`Job with id ${jobId} does not exist in outbox`, {
|
|
47
37
|
messageId,
|
|
48
38
|
jobId,
|
|
49
39
|
});
|
|
50
40
|
return;
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
42
|
+
this.logger.info(`Job ${jobId} exists in outbox`, { messageId, jobId });
|
|
43
|
+
if (entity.status === OutboxStatus.FAILED) {
|
|
44
|
+
this.logger.warn(`Job ${jobId} already marked as FAILED. Skipping to avoid duplicate events.`, { messageId, jobId });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const originalPayload = entity.payload;
|
|
48
|
+
if (!jobType) {
|
|
49
|
+
this.logger.warn(`Missing jobType for job ${jobId}. Skipping feedback event.`, {
|
|
50
|
+
messageId,
|
|
51
|
+
jobId,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
await this.db.transaction(async (manager) => {
|
|
55
|
+
this.logger.info(`Attempting to mark job ${jobId} as FAILED in jobs_outbox`, {
|
|
56
|
+
messageId,
|
|
57
|
+
jobId,
|
|
58
|
+
});
|
|
59
|
+
const updateResult = await manager.update(JobsOutboxModel, { id: jobId, status: OutboxStatus.PENDING }, { status: OutboxStatus.FAILED });
|
|
60
|
+
if (updateResult.affected === 0) {
|
|
61
|
+
this.logger.warn(`Race condition avoided: Job ${jobId} already updated or deleted.`, {
|
|
62
|
+
messageId,
|
|
63
|
+
jobId,
|
|
66
64
|
});
|
|
67
|
-
|
|
65
|
+
return;
|
|
68
66
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
this.logger.info(`Successfully marked job ${jobId} as FAILED in jobs_outbox`, {
|
|
68
|
+
messageId,
|
|
69
|
+
jobId,
|
|
70
|
+
});
|
|
71
|
+
if (jobType) {
|
|
72
|
+
try {
|
|
73
|
+
const transactionalEventWriter = new EventQueueWriter(this.logger, new EventQueueRepository(manager.getRepository(EventQueueModel)));
|
|
74
|
+
const eventType = getEventForJob(jobType);
|
|
75
|
+
const eventEntity = EventQueueEntity.createEvent({
|
|
76
|
+
type: eventType,
|
|
77
|
+
emitter: 'ms-post-processors',
|
|
78
|
+
emitterId: jobId,
|
|
79
|
+
targetServices: [Streams.WS_JOBS_OUTBOX_FAILURE],
|
|
80
|
+
payload: {
|
|
81
|
+
status: 'FAILED',
|
|
82
|
+
originalPayload,
|
|
83
|
+
error: errorMessage ?? undefined,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
await transactionalEventWriter.create(eventEntity);
|
|
87
|
+
this.logger.info(`Successfully created feedback event ${eventType} for job ${jobId}`, { messageId, jobId, eventType });
|
|
88
|
+
}
|
|
89
|
+
catch (mappingError) {
|
|
90
|
+
this.logger.debug(`No feedback event emitted for failed job ${jobId} of type ${jobType}`, {
|
|
91
|
+
error: mappingError,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
73
94
|
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
error
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
95
|
+
});
|
|
96
|
+
this.logger.info(`Finished processing JOB_OUTBOX_FAILED for job ${jobId}`, {
|
|
97
|
+
messageId,
|
|
98
|
+
jobId,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
this.logger.error(`Failed to process JOB_OUTBOX_FAILED for job ${jobId}`, {
|
|
103
|
+
messageId,
|
|
104
|
+
jobId,
|
|
105
|
+
error,
|
|
106
|
+
});
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
85
110
|
}
|
|
86
111
|
}
|
|
87
112
|
//# sourceMappingURL=job-outbox-failed.post-processor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-outbox-failed.post-processor.js","sourceRoot":"","sources":["../../src/common/job-outbox-failed.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"job-outbox-failed.post-processor.js","sourceRoot":"","sources":["../../src/common/job-outbox-failed.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAGhF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,OAAO,4BAA6B,SAAQ,kBAA8D;IAC7F,gBAAgB,CAAuB;IACvC,EAAE,CAAa;IAEhC,YAAY,EAAc,EAAE,WAAkB,EAAE,OAA6B;QAC3E,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,gBAAgB,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC;IAEkB,aAAa,CAAC,SAA4C;QAC3E,OAAO,SAAS,KAAK,wBAAwB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAC7E,CAAC;IAES,KAAK,CAAC,aAAa,CAC3B,MAAoE;QAEpE,MAAM,OAAO,CAAC,GAAG,CACf,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;YACxC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;YACzC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC7C,MAAM,YA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AAI,CAAC,MAAM,CAAC,IAAI,CACd,uCAAuC,SAAS,YAAY,KAAK,EAAE,EACnE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAChC,CAAC;wBACJ,CAAC;wBAAC,OAAO,YAAY,EAAE,CAAC;4BACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,4CAA4C,KAAK,YAAY,OAAO,EAAE,EACtE;gCACE,KAAK,EAAE,YAAY;6BACpB,CACF,CAAC;wBACJ,CAAC;oBACH,CAAC;gBACH,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iDAAiD,KAAK,EAAE,EAAE;oBACzE,SAAS;oBACT,KAAK;iBACN,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,+CAA+C,KAAK,EAAE,EAAE;oBACxE,SAAS;oBACT,KAAK;oBACL,KAAK;iBACN,CAAC,CAAC;gBACH,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { PostProcessorOptions } from '../interfaces/index.js';
|
|
3
|
-
import { CommonEventMessagingType
|
|
1
|
+
import { BatchPostProcessor } from '../core/processors/batch.post-processor.js';
|
|
2
|
+
import type { PostProcessorOptions, BatchEventItem } from '../interfaces/index.js';
|
|
3
|
+
import { CommonEventMessagingType } from '@volontariapp/messaging';
|
|
4
4
|
import type { DataSource } from 'typeorm';
|
|
5
5
|
import type { Redis } from 'ioredis';
|
|
6
|
-
export declare class JobOutboxSuccessPostProcessor extends
|
|
6
|
+
export declare class JobOutboxSuccessPostProcessor extends BatchPostProcessor<CommonEventMessagingType.JOB_OUTBOX_SUCCESS> {
|
|
7
7
|
private readonly outboxRepository;
|
|
8
8
|
private readonly db;
|
|
9
9
|
constructor(db: DataSource, redisDriver: Redis, options: PostProcessorOptions);
|
|
10
10
|
protected shouldProcess(eventType: CommonEventMessagingType | string): boolean;
|
|
11
|
-
protected
|
|
11
|
+
protected processEvents(events: BatchEventItem<CommonEventMessagingType.JOB_OUTBOX_SUCCESS>[]): Promise<void>;
|
|
12
12
|
}
|
|
13
13
|
//# sourceMappingURL=job-outbox-success.post-processor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-outbox-success.post-processor.d.ts","sourceRoot":"","sources":["../../src/common/job-outbox-success.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"job-outbox-success.post-processor.d.ts","sourceRoot":"","sources":["../../src/common/job-outbox-success.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAInE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGrC,qBAAa,6BAA8B,SAAQ,kBAAkB,CAAC,wBAAwB,CAAC,kBAAkB,CAAC;IAChH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IACxD,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAa;gBAEpB,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,oBAAoB;cAM1D,aAAa,CAAC,SAAS,EAAE,wBAAwB,GAAG,MAAM,GAAG,OAAO;cAIvE,aAAa,CAC3B,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,EAAE,GACpE,OAAO,CAAC,IAAI,CAAC;CA2GjB"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CommonEventMessagingType
|
|
1
|
+
import { BatchPostProcessor } from '../core/processors/batch.post-processor.js';
|
|
2
|
+
import { CommonEventMessagingType } from '@volontariapp/messaging';
|
|
3
3
|
import { JobsOutboxRepository, EventQueueWriter, EventQueueRepository } from '@volontariapp/outbox';
|
|
4
4
|
import { EventQueueEntity, EventQueueModel, JobsOutboxModel } from '@volontariapp/database';
|
|
5
5
|
import { getEventForJob } from '@volontariapp/messaging';
|
|
6
6
|
import { Streams } from '@volontariapp/shared';
|
|
7
|
-
export class JobOutboxSuccessPostProcessor extends
|
|
7
|
+
export class JobOutboxSuccessPostProcessor extends BatchPostProcessor {
|
|
8
8
|
outboxRepository;
|
|
9
9
|
db;
|
|
10
10
|
constructor(db, redisDriver, options) {
|
|
@@ -15,71 +15,94 @@ export class JobOutboxSuccessPostProcessor extends SinglePostProcessor {
|
|
|
15
15
|
shouldProcess(eventType) {
|
|
16
16
|
return eventType === CommonEventMessagingType.JOB_OUTBOX_SUCCESS.toString();
|
|
17
17
|
}
|
|
18
|
-
async
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this.logger.
|
|
18
|
+
async processEvents(events) {
|
|
19
|
+
await Promise.all(events.map(async ({ event, messageId }) => {
|
|
20
|
+
const jobId = event.payload.after.job_id;
|
|
21
|
+
const jobType = event.payload.after.job_type;
|
|
22
|
+
this.logger.info(`Starting processing of JOB_OUTBOX_SUCCESS for job ${String(jobId)}`, {
|
|
23
23
|
messageId,
|
|
24
|
+
jobId,
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const exists = await this.outboxRepository.exists({ id: jobId });
|
|
29
|
-
if (!exists) {
|
|
30
|
-
this.logger.error(`Job with id ${jobId} does not exist in outbox`, { messageId, jobId });
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const originalPayload = event.payload.after.result_payload?.originalPayload;
|
|
34
|
-
if (!jobType || !originalPayload) {
|
|
35
|
-
this.logger.warn(`Missing jobType or originalPayload for job ${jobId}. Skipping feedback event.`, {
|
|
26
|
+
if (!jobId) {
|
|
27
|
+
this.logger.error('Received JOB_OUTBOX_SUCCESS but no job_id found in payload', {
|
|
36
28
|
messageId,
|
|
37
|
-
jobId,
|
|
38
|
-
jobType,
|
|
39
|
-
hasOriginalPayload: !!originalPayload,
|
|
40
29
|
});
|
|
30
|
+
return;
|
|
41
31
|
}
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
this.logger.
|
|
32
|
+
try {
|
|
33
|
+
const exists = await this.outboxRepository.exists({ id: jobId });
|
|
34
|
+
if (!exists) {
|
|
35
|
+
this.logger.error(`Job with id ${jobId} does not exist in outbox`, {
|
|
46
36
|
messageId,
|
|
47
37
|
jobId,
|
|
48
38
|
});
|
|
49
39
|
return;
|
|
50
40
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
this.logger.info(`Job ${jobId} exists in outbox`, { messageId, jobId });
|
|
42
|
+
const originalPayload = event.payload.after.result_payload?.originalPayload;
|
|
43
|
+
if (!jobType || !originalPayload) {
|
|
44
|
+
this.logger.warn(`Missing jobType or originalPayload for job ${jobId}. Skipping feedback event.`, {
|
|
45
|
+
messageId,
|
|
46
|
+
jobId,
|
|
47
|
+
jobType,
|
|
48
|
+
hasOriginalPayload: !!originalPayload,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
await this.db.transaction(async (manager) => {
|
|
52
|
+
this.logger.info(`Attempting to delete job ${jobId} from jobs_outbox`, {
|
|
53
|
+
messageId,
|
|
54
|
+
jobId,
|
|
55
|
+
});
|
|
56
|
+
const deleteResult = await manager.delete(JobsOutboxModel, { id: jobId });
|
|
57
|
+
if (deleteResult.affected === 0) {
|
|
58
|
+
this.logger.warn(`Race condition avoided: Job ${jobId} already deleted.`, {
|
|
59
|
+
messageId,
|
|
60
|
+
jobId,
|
|
64
61
|
});
|
|
65
|
-
|
|
62
|
+
return;
|
|
66
63
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
this.logger.info(`Successfully deleted job ${jobId} from jobs_outbox`, {
|
|
65
|
+
messageId,
|
|
66
|
+
jobId,
|
|
67
|
+
});
|
|
68
|
+
if (jobType && originalPayload) {
|
|
69
|
+
try {
|
|
70
|
+
const transactionalEventWriter = new EventQueueWriter(this.logger, new EventQueueRepository(manager.getRepository(EventQueueModel)));
|
|
71
|
+
const eventType = getEventForJob(jobType);
|
|
72
|
+
const eventEntity = EventQueueEntity.createEvent({
|
|
73
|
+
type: eventType,
|
|
74
|
+
emitter: 'ms-post-processors',
|
|
75
|
+
emitterId: jobId,
|
|
76
|
+
targetServices: [Streams.WS_JOBS_OUTBOX_SUCCESS],
|
|
77
|
+
payload: {
|
|
78
|
+
status: 'SUCCESS',
|
|
79
|
+
originalPayload,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
await transactionalEventWriter.create(eventEntity);
|
|
83
|
+
this.logger.info(`Successfully created feedback event ${eventType} for job ${jobId}`, { messageId, jobId, eventType });
|
|
84
|
+
}
|
|
85
|
+
catch (mappingError) {
|
|
86
|
+
this.logger.debug(`No feedback event emitted for job ${jobId} of type ${jobType}`, {
|
|
87
|
+
error: mappingError,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
71
90
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
error
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
91
|
+
});
|
|
92
|
+
this.logger.info(`Finished processing JOB_OUTBOX_SUCCESS for job ${jobId}`, {
|
|
93
|
+
messageId,
|
|
94
|
+
jobId,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
this.logger.error(`Failed to process JOB_OUTBOX_SUCCESS for job ${jobId}`, {
|
|
99
|
+
messageId,
|
|
100
|
+
jobId,
|
|
101
|
+
error,
|
|
102
|
+
});
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
}));
|
|
83
106
|
}
|
|
84
107
|
}
|
|
85
108
|
//# sourceMappingURL=job-outbox-success.post-processor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-outbox-success.post-processor.js","sourceRoot":"","sources":["../../src/common/job-outbox-success.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"job-outbox-success.post-processor.js","sourceRoot":"","sources":["../../src/common/job-outbox-success.post-processor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAGhF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,OAAO,6BAA8B,SAAQ,kBAA+D;IAC/F,gBAAgB,CAAuB;IACvC,EAAE,CAAa;IAEhC,YAAY,EAAc,EAAE,WAAkB,EAAE,OAA6B;QAC3E,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,gBAAgB,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC;IAEkB,aAAa,CAAC,SAA4C;QAC3E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AE;oCACP,MAAM,EAAE,SAAkB;oCAE1B,eAAe;iCAChB;6BACF,CAAC,CAAC;4BACH,MAAM,wBAAwB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;4BACnD,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,uCAAuC,SAAS,YAAY,KAAK,EAAE,EACnE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAChC,CAAC;wBACJ,CAAC;wBAAC,OAAO,YAAY,EAAE,CAAC;4BACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,KAAK,YAAY,OAAO,EAAE,EAAE;gCACjF,KAAK,EAAE,YAAY;6BACpB,CAAC,CAAC;wBACL,CAAC;oBACH,CAAC;gBACH,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kDAAkD,KAAK,EAAE,EAAE;oBAC1E,SAAS;oBACT,KAAK;iBACN,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,gDAAgD,KAAK,EAAE,EAAE;oBACzE,SAAS;oBACT,KAAK;oBACL,KAAK;iBACN,CAAC,CAAC;gBACH,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JobOutboxFailedPostProcessor } from '../../../common/job-outbox-failed.post-processor.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CommonEventMessagingType } from '@volontariapp/messaging';
|
|
3
|
+
import type { BatchEventItem } from '../../../interfaces/index.js';
|
|
3
4
|
export declare class TestFailedProcessor extends JobOutboxFailedPostProcessor {
|
|
4
|
-
|
|
5
|
+
testProcessEvents(events: BatchEventItem<CommonEventMessagingType.JOB_OUTBOX_FAILED>[]): Promise<void>;
|
|
5
6
|
getLogger(): import("@volontariapp/logger").Logger;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=test-job-outbox-failed.post-processor.class.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-job-outbox-failed.post-processor.class.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-failed.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"test-job-outbox-failed.post-processor.class.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-failed.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,qBAAa,mBAAoB,SAAQ,4BAA4B;IAC5D,iBAAiB,CAAC,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,iBAAiB,CAAC,EAAE;IAItF,SAAS;CAGjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JobOutboxFailedPostProcessor } from '../../../common/job-outbox-failed.post-processor.js';
|
|
2
2
|
export class TestFailedProcessor extends JobOutboxFailedPostProcessor {
|
|
3
|
-
|
|
4
|
-
return this.
|
|
3
|
+
testProcessEvents(events) {
|
|
4
|
+
return this.processEvents(events);
|
|
5
5
|
}
|
|
6
6
|
getLogger() {
|
|
7
7
|
return this.logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-job-outbox-failed.post-processor.class.js","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-failed.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"test-job-outbox-failed.post-processor.class.js","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-failed.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qDAAqD,CAAC;AAInG,MAAM,OAAO,mBAAoB,SAAQ,4BAA4B;IAC5D,iBAAiB,CAAC,MAAoE;QAC3F,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JobOutboxSuccessPostProcessor } from '../../../common/job-outbox-success.post-processor.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CommonEventMessagingType } from '@volontariapp/messaging';
|
|
3
|
+
import type { BatchEventItem } from '../../../interfaces/index.js';
|
|
3
4
|
export declare class TestSuccessProcessor extends JobOutboxSuccessPostProcessor {
|
|
4
|
-
|
|
5
|
+
testProcessEvents(events: BatchEventItem<CommonEventMessagingType.JOB_OUTBOX_SUCCESS>[]): Promise<void>;
|
|
5
6
|
getLogger(): import("@volontariapp/logger").Logger;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=test-job-outbox-success.post-processor.class.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-job-outbox-success.post-processor.class.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-success.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AACrG,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"test-job-outbox-success.post-processor.class.d.ts","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-success.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AACrG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,qBAAa,oBAAqB,SAAQ,6BAA6B;IAC9D,iBAAiB,CAAC,MAAM,EAAE,cAAc,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,EAAE;IAIvF,SAAS;CAGjB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JobOutboxSuccessPostProcessor } from '../../../common/job-outbox-success.post-processor.js';
|
|
2
2
|
export class TestSuccessProcessor extends JobOutboxSuccessPostProcessor {
|
|
3
|
-
|
|
4
|
-
return this.
|
|
3
|
+
testProcessEvents(events) {
|
|
4
|
+
return this.processEvents(events);
|
|
5
5
|
}
|
|
6
6
|
getLogger() {
|
|
7
7
|
return this.logger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-job-outbox-success.post-processor.class.js","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-success.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"test-job-outbox-success.post-processor.class.js","sourceRoot":"","sources":["../../../../src/test/utils/classes/test-job-outbox-success.post-processor.class.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAIrG,MAAM,OAAO,oBAAqB,SAAQ,6BAA6B;IAC9D,iBAAiB,CAAC,MAAqE;QAC5F,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;IAEM,SAAS;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volontariapp/post-processors",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0-snap-2aefdbd",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"test:int:watch": "INTEGRATION=true node --experimental-vm-modules $(yarn bin jest) --watch"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@volontariapp/database": "3.3.
|
|
40
|
+
"@volontariapp/database": "3.3.15",
|
|
41
41
|
"@volontariapp/health-check": "1.0.4",
|
|
42
42
|
"@volontariapp/logger": "0.2.5",
|
|
43
|
-
"@volontariapp/messaging": "2.9.
|
|
44
|
-
"@volontariapp/outbox": "0.9.
|
|
45
|
-
"@volontariapp/shared": "0.
|
|
43
|
+
"@volontariapp/messaging": "2.9.1",
|
|
44
|
+
"@volontariapp/outbox": "0.9.33",
|
|
45
|
+
"@volontariapp/shared": "0.8.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@nestjs/common": "^11.0.0",
|