@sentio/runtime 2.59.0-rc.40 → 2.59.0-rc.42
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/lib/{chunk-ELSE7PSY.js → chunk-OGXSRUVD.js} +27 -9
- package/lib/{chunk-ELSE7PSY.js.map → chunk-OGXSRUVD.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/processor-runner.js +10 -1
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +20 -7
- package/lib/service-worker.js.map +1 -1
- package/package.json +1 -1
- package/src/service-manager.ts +11 -0
- package/src/service-worker.ts +20 -16
package/lib/index.js
CHANGED
package/lib/processor-runner.js
CHANGED
@@ -43,7 +43,7 @@ import {
|
|
43
43
|
require_lodash,
|
44
44
|
require_src,
|
45
45
|
trace
|
46
|
-
} from "./chunk-
|
46
|
+
} from "./chunk-OGXSRUVD.js";
|
47
47
|
import {
|
48
48
|
ExecutionConfig,
|
49
49
|
PluginManager,
|
@@ -26362,6 +26362,15 @@ var ServiceManager = class extends ProcessorServiceImpl {
|
|
26362
26362
|
if (this.pool) {
|
26363
26363
|
await this.pool.close();
|
26364
26364
|
}
|
26365
|
+
if (this.enablePartition) {
|
26366
|
+
const concurrent = parseInt(process.env["PROCESS_CONCURRENCY"] || "0");
|
26367
|
+
if (this.options.worker < concurrent) {
|
26368
|
+
console.warn(
|
26369
|
+
`When partition is enabled, the worker count must >= 'PROCESS_CONCURRENCY', will set worker count to ${concurrent})`
|
26370
|
+
);
|
26371
|
+
this.options.worker = concurrent;
|
26372
|
+
}
|
26373
|
+
}
|
26365
26374
|
console.info("Initializing worker pool with worker count:", this.options.worker);
|
26366
26375
|
this.pool = new Piscina({
|
26367
26376
|
maxThreads: this.options.worker,
|