@seidor-cloud-produtos/orbit-backend-lib 2.0.25 → 2.0.27
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/clean-arch/infra/adapters/express-adapter.js +1 -1
- package/dist/clean-arch/infra/adapters/fastify-adapter.js +1 -1
- package/dist/clean-arch/infra/logger/logger-in-memory.js +1 -1
- package/dist/clean-arch/infra/scaledjob/runner.d.ts +1 -1
- package/dist/clean-arch/infra/scaledjob/runner.js +7 -5
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export declare class RabbitMQScaledJobRunner<T = any> {
|
|
|
8
8
|
private readonly amqpQueue;
|
|
9
9
|
private readonly queueName;
|
|
10
10
|
private readonly handler;
|
|
11
|
-
private
|
|
11
|
+
private options;
|
|
12
12
|
constructor(amqpQueue: AmqpQueue, queueName: string, handler: Handler, options?: IRunnerOptions);
|
|
13
13
|
private setOptions;
|
|
14
14
|
private handleError;
|
|
@@ -15,11 +15,13 @@ class RabbitMQScaledJobRunner {
|
|
|
15
15
|
this.setOptions(options);
|
|
16
16
|
}
|
|
17
17
|
setOptions(options) {
|
|
18
|
-
this.options
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
options?.parse ||
|
|
22
|
-
|
|
18
|
+
this.options = {
|
|
19
|
+
errorStrategy: options?.errorStrategy || 'nack-dlq',
|
|
20
|
+
manualAck: options?.manualAck || true,
|
|
21
|
+
parse: options?.parse ||
|
|
22
|
+
(raw => JSON.parse(raw.content.toString())),
|
|
23
|
+
timeoutMs: options?.timeoutMs || 10000,
|
|
24
|
+
};
|
|
23
25
|
}
|
|
24
26
|
async handleError(error, getResult) {
|
|
25
27
|
if (!getResult) {
|