Skip to content

JobSignal

Tells a background job whether it has to stop. The app sets the signal when the plugin is turned off. ctx.jobs.run passes it to the job.

readonly aborted: boolean;

true when the plugin has been turned off, which means that the job has to stop.

throwIfAborted(): void;

Throws an AbortError when aborted is true, and does nothing otherwise. A long job calls it between its steps, so that it stops soon after the plugin is turned off.

void