Skip to content

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

Class: XxlJobNodeJsInProcessHandlerRunner

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

The task runner for Node.js scripts that are executed in current process.

WATCH OUT: Don't run any untrusted code here, as it will possibly cause RCE (Remote Code Execution) vulnerabilities.

Implements

Constructors

Constructor

new XxlJobNodeJsInProcessHandlerRunner(opts): XxlJobNodeJsInProcessHandlerRunner

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

Parameters

opts

IRunnerOptions = {}

Returns

XxlJobNodeJsInProcessHandlerRunner

Properties

type

readonly type: EJobType = cL.EJobType.NODE_JS

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

The type of the jobs that this runner can handle.

Implementation of

IJobRunner.type

Methods

prepare()

prepare(args): null | IRunnerPrepareResult

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

Prepare to run the task with the given arguments.

Parameters

args

IRunTaskArgs

Returns

null | IRunnerPrepareResult

null if the task cannot be prepared, or an object containing settings for the task.

Implementation of

IJobRunner.prepare


run()

run(ctx): Promise<void>

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

Run the task with the given context.

Parameters

ctx

IContext

The context of the task to run, which contains the task data and task information.

Returns

Promise<void>

Implementation of

IJobRunner.run