@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.
|
@@ -27,7 +27,7 @@ class SQSScaledJobRunner {
|
|
|
27
27
|
}
|
|
28
28
|
return JSON.parse(rawMessage);
|
|
29
29
|
}
|
|
30
|
-
async
|
|
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;
|