Skip to main content

addDependency

client.jobs.addDependency(id: string, data: AddDependencyRequest): Promise<void>

Adds a dependency between two jobs.

Declares that the specified job depends on another job, meaning it cannot start until the dependency is resolved. This builds the job dependency graph used for scheduling.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the dependent job
dataAddDependencyRequestYesDependency payload specifying the target job that must complete first

Returns​

Promise<void> — A promise that resolves when the dependency has been added

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.jobs.addDependency('id', /* AddDependencyRequest */);
console.log(result);