@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/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  providerMetrics,
30
30
  recordRuntimeInfo,
31
31
  timeoutError
32
- } from "./chunk-ELSE7PSY.js";
32
+ } from "./chunk-OGXSRUVD.js";
33
33
  import {
34
34
  Plugin,
35
35
  PluginManager
@@ -43,7 +43,7 @@ import {
43
43
  require_lodash,
44
44
  require_src,
45
45
  trace
46
- } from "./chunk-ELSE7PSY.js";
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,