Skip to content

Documents for @litert/xxl-job-integration / JobRunner/NodeJsInProcess / IRunnerOptions

Interface: IRunnerOptions ​

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:39

The options for the Node.js script runner.

Properties ​

cacheTtl? ​

optional cacheTtl?: number

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:53

The time-to-live (TTL) of each cached script in seconds.

Default ​

ts
3600 (30 minutes)

envData? ​

optional envData?: IScriptEnvData | (() => IScriptEnvData)

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:46

The (generator of) environment data that will be passed to the js script when it is executed.

Default ​

ts
() => {}

gcReservedPercentage? ​

optional gcReservedPercentage?: number

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:68

How many percentage of the cached scripts should be kept when the garbage collector runs due to the cache size limit.

Default ​

ts
60%

gcRunRatio? ​

optional gcRunRatio?: number

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:82

The ratio of the garbage collector to run.

Default ​

ts
0.5

maxCacheScripts? ​

optional maxCacheScripts?: number

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:60

The maximum quantity of the cache for the scripts.

Default ​

ts
100

maxQueueDepth? ​

optional maxQueueDepth?: number

Defined in: src/lib/JobRunner/NodeJsInProcess.ts:75

The maximum queue depth for the job handlers.

Default ​

ts
10