engine/isolation/policy

Decide whether an app runs scripts in a worker process, and which worker key (app or group). Engine-internal.
Description:
  • Decide whether an app runs scripts in a worker process, and which worker key (app or group). Engine-internal.

Methods

(inner) appsForWorker(app, config, allApps) → {Array.<string>}

Description:
  • App names that should be loaded into the same worker as this app.
Parameters:
Name Type Description
app object
config object
allApps object full apps registry (optional; falls back to [app.name])
Returns:
Type
Array.<string>

(inner) resolveGroupId(appName, iso) → {string|null}

Parameters:
Name Type Description
appName string
iso object config.isolation
Returns:
group id without prefix, or null
Type
string | null

(inner) resolveWorkerKey(app, config) → {string|null}

Description:
  • Stable worker map key for an isolated app.
Parameters:
Name Type Description
app object
config object
Returns:
null if not isolated
Type
string | null

(inner) restartDelayMs(attempt, iso)

Description:
  • Compute restart delay with exponential backoff.
Parameters:
Name Type Description
attempt number 0-based restart attempt after first crash
iso object

(inner) shouldIsolateApp(app, config) → {boolean}

Parameters:
Name Type Description
app object live app object
config object resolved gingee.json
Returns:
Type
boolean