Skip to content

GetJobQueueSnapshot

Source: src/AWS/Batch/GetJobQueueSnapshot.ts

Snapshot the head of the bound AWS Batch job queue (the next ~100 RUNNABLE jobs the scheduler will run, in dispatch order) — queue introspection for dashboards and backpressure decisions from runtime code.

const getJobQueueSnapshot = yield* Batch.GetJobQueueSnapshot(queue);
const { frontOfQueue } = yield* getJobQueueSnapshot();
const next = frontOfQueue?.jobs?.[0]?.jobArn;