.jobs.kill Liatir.jobs.kill() stops a running async process job.
kill(jobId: string): Promise<boolean>kill(job_id) -> bool| Parameter | Type | Description |
|---|---|---|
jobId | string | Unique identifier for the job. |
| Parameter | Type | Description |
|---|---|---|
job_id | str | Unique identifier for the job. |
const killed = await Liatir.jobs.kill(jobId);
if (killed) {
console.log('Job terminated successfully');
}killed = ctx.liatir.jobs.kill(job_id)
if killed:
print('Job terminated successfully')Returns true if the job was successfully killed, false otherwise.
Use this method with caution.