Skip to content

Documents for @litert/xxl-job-integration / Executor/Typings / IJobRunner

Interface: IJobRunner

Defined in: src/lib/Executor/Typings.ts:162

The runner who finally handles the tasks of a specific job type.

Properties

type

readonly type: EJobType

Defined in: src/lib/Executor/Typings.ts:167

The type of the jobs that this runner can handle.

Methods

prepare()

prepare(args): null | IRunnerPrepareResult

Defined in: src/lib/Executor/Typings.ts:181

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.


run()

run(ctx): void | Promise<void>

Defined in: src/lib/Executor/Typings.ts:174

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

void | Promise<void>