@seidor-cloud-produtos/orbit-backend-lib 2.0.36 → 2.0.37

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.
@@ -7,6 +7,5 @@ export declare class SQSScaledJobRunner {
7
7
  private sqs;
8
8
  constructor(handler: Handler, queueUrl: string, options: SQSScaledJobOptions);
9
9
  private static parseMessage;
10
- process(): Promise<void>;
11
10
  run(): Promise<void>;
12
11
  }
@@ -27,7 +27,7 @@ class SQSScaledJobRunner {
27
27
  }
28
28
  return JSON.parse(rawMessage);
29
29
  }
30
- async process() {
30
+ async run() {
31
31
  let consumedMessages = 0;
32
32
  const simultaneity = this.handler.getSimultaneity();
33
33
  const timeoutPerMessageSeconds = this.handler.getTimeoutPerMessageSeconds();
@@ -79,12 +79,5 @@ class SQSScaledJobRunner {
79
79
  }
80
80
  }
81
81
  }
82
- async run() {
83
- const promises = [this.process()];
84
- if (this.options.processTimeoutSeconds) {
85
- promises.push((0, timeout_1.sleep)(this.options.processTimeoutSeconds * 1000));
86
- }
87
- await Promise.race(promises);
88
- }
89
82
  }
90
83
  exports.SQSScaledJobRunner = SQSScaledJobRunner;
@@ -1,6 +1,5 @@
1
1
  import { ScaledJobOptions } from '../types';
2
2
  export interface SQSScaledJobOptions extends ScaledJobOptions {
3
3
  sqsRegion: string;
4
- processTimeoutSeconds?: number;
5
4
  waitMessagesTimeSeconds?: number;
6
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "2.0.36",
3
+ "version": "2.0.37",
4
4
  "description": "Internal lib for backend components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",