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.
Type Parameters
Section titled “Type Parameters”TJobTypes
Section titled “TJobTypes”TJobTypes extends JobTypes<any> | readonly [JobTypes<any>, JobTypes<any>]
TStateAdapter
Section titled “TStateAdapter”TStateAdapter extends StateAdapter<any, any>
Parameters
Section titled “Parameters”options
Section titled “options”Client configuration.
jobTypes
Section titled “jobTypes”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.
Optional structured log function.
notifyAdapter?
Section titled “notifyAdapter?”Optional pub/sub adapter for real-time notifications.
observabilityAdapter?
Section titled “observabilityAdapter?”Optional adapter for metrics and tracing.
stateAdapter
Section titled “stateAdapter”TStateAdapter
Database adapter for job persistence.
Returns
Section titled “Returns”Promise<Client<JobTypesDefinitions<TJobTypes>, TStateAdapter, GetStateAdapterJobId<TStateAdapter>>>