Skip to content

createClient

createClient<TJobTypes, TStateAdapter>(options): Promise<Client<JobTypesDefinitions<TJobTypes>, TStateAdapter, GetStateAdapterJobId<TStateAdapter>>>

Defined in: packages/core/src/client.ts:616

Create a new Queuert client.

TJobTypes extends JobTypes<any> | readonly [JobTypes<any>, JobTypes<any>]

TStateAdapter extends StateAdapter<any, any>

Client configuration.

TJobTypes extends readonly JobTypes<any>[] ? ValidatedSlices<TJobTypes> & TJobTypes : TJobTypes

A single JobTypes slice, or an array of slices to merge. Slices are built with defineJobTypes or createJobTypes.

Log

Optional structured log function.

NotifyAdapter

Optional pub/sub adapter for real-time notifications.

ObservabilityAdapter

Optional adapter for metrics and tracing.

TStateAdapter

Database adapter for job persistence.

Promise<Client<JobTypesDefinitions<TJobTypes>, TStateAdapter, GetStateAdapterJobId<TStateAdapter>>>