Skip to content
Get started
Get started
Progress, Job Logs and Dependencies
guide · queue

What a job is doing right now.

A job that runs for ten minutes should not be a black box. Progress and logs make it observable, and dependency links show how it relates to the rest of a graph.

// Progress and logs (also available on the job object inside a processor)
await queue.updateJobProgress('job-id', 75);
await queue.addJobLog('job-id', 'Processing step 3 completed');
const { logs, count } = await queue.getJobLogs('job-id', 0, 100);
// Parent/child flows (see the Flow guide)
const childValues = await queue.getChildrenValues('parent-job-id');
const deps = await queue.getJobDependencies('job-id');
const processed = await queue.getDependencies('parent-id', 'processed', 0, 10);
// Wait for a job to finish (requires a QueueEvents instance)
import { QueueEvents } from 'bunqueue/client';
const queueEvents = new QueueEvents('my-queue', {
embedded: false,
connection: { host: '127.0.0.1', port: 6789 },
});
await queueEvents.waitUntilReady();
const result = await queue.waitJobUntilFinished('job-id', queueEvents, 30000);

getJobDependencies, getDependencies, and QueueEvents are available in the Bun bunqueue package. Bun QueueEvents supports both embedded and TCP brokers; use the same connection and prefixKey as the Queue. External SDKs expose waitForJob for the common wait-for-result case and can use SSE/WebSocket for live queue events.

Manual state transitions are BullMQ-compatible. Whenever the active job has a lock, token is mandatory and must be that job’s current worker token in both embedded and TCP mode. Jobs processed without locks remain administratively movable without one:

await queue.moveJobToCompleted('job-id', { success: true }, token);
await queue.moveJobToFailed('job-id', new Error('reason'), token);
await queue.moveJobToWait('job-id', token);
await queue.moveJobToDelayed('job-id', Date.now() + 60000, token);
await queue.moveJobToWaitingChildren('job-id', token);

The full token-bound transition set is available in TypeScript and Python; PHP and Go expose moveJobToFailed, Elixir exposes move_to_delayed and retry_job, and Rust intentionally leaves completion/failure acknowledgements to Worker while exposing queue-level retry.

Queue APICreate a queue in embedded or TCP mode
Adding Jobsadd, addBulk, priorities, delays, durability
Deduplication and Idempotent Job AddsIdempotent adds, dedup keys, custom job ids
Querying JobsFetch jobs, states, counts and results
Queue Control and MaintenancePause, drain, obliterate, clean and repair
Queue Rate Limiting and Global ConcurrencyRate limits and global concurrency caps
Job Schedulers from the QueueNamed repeatable schedules from the queue
DLQ Operations from the Queue ObjectFailed-job operations from the Queue object
Workers, Stats and Metrics from the QueueRegistered workers, stats and metrics windows
Namespaces, Auto-Batching and Store-and-ForwardNamespaces, auto-batching, store-and-forward
JobOptions ReferenceEvery JobOptions field, with defaults