# Table of Contents
- [v5 | bullmq - v5.41.8](#v5-bullmq-v5-41-8)
- [ChildCommand | bullmq - v5.41.8](#childcommand-bullmq-v5-41-8)
- [ClientType | bullmq - v5.41.8](#clienttype-bullmq-v5-41-8)
- [ParentCommand | bullmq - v5.41.8](#parentcommand-bullmq-v5-41-8)
- [SpanKind | bullmq - v5.41.8](#spankind-bullmq-v5-41-8)
- [bullmq - v5.41.8](#bullmq-v5-41-8)
- [ErrorCode | bullmq - v5.41.8](#errorcode-bullmq-v5-41-8)
- [AsyncFifoQueue | bullmq - v5.41.8](#asyncfifoqueue-bullmq-v5-41-8)
- [TelemetryAttributes | bullmq - v5.41.8](#telemetryattributes-bullmq-v5-41-8)
- [MetricsTime | bullmq - v5.41.8](#metricstime-bullmq-v5-41-8)
- [Backoffs | bullmq - v5.41.8](#backoffs-bullmq-v5-41-8)
- [Child | bullmq - v5.41.8](#child-bullmq-v5-41-8)
- [ChildPool | bullmq - v5.41.8](#childpool-bullmq-v5-41-8)
- [ChildProcessor | bullmq - v5.41.8](#childprocessor-bullmq-v5-41-8)
- [DelayedError | bullmq - v5.41.8](#delayederror-bullmq-v5-41-8)
- [v4 | bullmq - v5.41.8](#v4-bullmq-v5-41-8)
- [FlowProducer | bullmq - v5.41.8](#flowproducer-bullmq-v5-41-8)
- [v3 | bullmq - v5.41.8](#v3-bullmq-v5-41-8)
- [v2 | bullmq - v5.41.8](#v2-bullmq-v5-41-8)
- [Job | bullmq - v5.41.8](#job-bullmq-v5-41-8)
- [v1 | bullmq - v5.41.8](#v1-bullmq-v5-41-8)
- [JobScheduler | bullmq - v5.41.8](#jobscheduler-bullmq-v5-41-8)
- [QueueEventsProducer | bullmq - v5.41.8](#queueeventsproducer-bullmq-v5-41-8)
- [Queue | bullmq - v5.41.8](#queue-bullmq-v5-41-8)
- [QueueGetters | bullmq - v5.41.8](#queuegetters-bullmq-v5-41-8)
- [QueueKeys | bullmq - v5.41.8](#queuekeys-bullmq-v5-41-8)
- [RedisConnection | bullmq - v5.41.8](#redisconnection-bullmq-v5-41-8)
- [QueueBase | bullmq - v5.41.8](#queuebase-bullmq-v5-41-8)
- [QueueEvents | bullmq - v5.41.8](#queueevents-bullmq-v5-41-8)
- [RateLimitError | bullmq - v5.41.8](#ratelimiterror-bullmq-v5-41-8)
- [UnrecoverableError | bullmq - v5.41.8](#unrecoverableerror-bullmq-v5-41-8)
- [Repeat | bullmq - v5.41.8](#repeat-bullmq-v5-41-8)
- [WaitingChildrenError | bullmq - v5.41.8](#waitingchildrenerror-bullmq-v5-41-8)
- [Worker | bullmq - v5.41.8](#worker-bullmq-v5-41-8)
- [AddNodeOpts | bullmq - v5.41.8](#addnodeopts-bullmq-v5-41-8)
- [Scripts | bullmq - v5.41.8](#scripts-bullmq-v5-41-8)
- [AddChildrenOpts | bullmq - v5.41.8](#addchildrenopts-bullmq-v5-41-8)
- [AdvancedOptions | bullmq - v5.41.8](#advancedoptions-bullmq-v5-41-8)
- [AdvancedRepeatOptions | bullmq - v5.41.8](#advancedrepeatoptions-bullmq-v5-41-8)
- [Attributes | bullmq - v5.41.8](#attributes-bullmq-v5-41-8)
- [BackoffOptions | bullmq - v5.41.8](#backoffoptions-bullmq-v5-41-8)
- [BaseJobOptions | bullmq - v5.41.8](#basejoboptions-bullmq-v5-41-8)
- [BaseOptions | bullmq - v5.41.8](#baseoptions-bullmq-v5-41-8)
- [BuiltInStrategies | bullmq - v5.41.8](#builtinstrategies-bullmq-v5-41-8)
- [ChildMessage | bullmq - v5.41.8](#childmessage-bullmq-v5-41-8)
- [ContextManager | bullmq - v5.41.8](#contextmanager-bullmq-v5-41-8)
- [DebounceOptions | bullmq - v5.41.8](#debounceoptions-bullmq-v5-41-8)
- [DefaultJobOptions | bullmq - v5.41.8](#defaultjoboptions-bullmq-v5-41-8)
- [DependenciesOpts | bullmq - v5.41.8](#dependenciesopts-bullmq-v5-41-8)
- [FlowJobBase | bullmq - v5.41.8](#flowjobbase-bullmq-v5-41-8)
- [FlowOpts | bullmq - v5.41.8](#flowopts-bullmq-v5-41-8)
- [FlowProducerListener | bullmq - v5.41.8](#flowproducerlistener-bullmq-v5-41-8)
- [GetNextJobOptions | bullmq - v5.41.8](#getnextjoboptions-bullmq-v5-41-8)
- [IConnection | bullmq - v5.41.8](#iconnection-bullmq-v5-41-8)
- [IoredisListener | bullmq - v5.41.8](#ioredislistener-bullmq-v5-41-8)
- [JobJson | bullmq - v5.41.8](#jobjson-bullmq-v5-41-8)
- [JobJsonRaw | bullmq - v5.41.8](#jobjsonraw-bullmq-v5-41-8)
- [JobNode | bullmq - v5.41.8](#jobnode-bullmq-v5-41-8)
- [JobSchedulerJson | bullmq - v5.41.8](#jobschedulerjson-bullmq-v5-41-8)
- [JobSchedulerTemplateJson | bullmq - v5.41.8](#jobschedulertemplatejson-bullmq-v5-41-8)
- [KeepJobs | bullmq - v5.41.8](#keepjobs-bullmq-v5-41-8)
- [Metrics | bullmq - v5.41.8](#metrics-bullmq-v5-41-8)
- [MetricsOptions | bullmq - v5.41.8](#metricsoptions-bullmq-v5-41-8)
- [MinimalJob | bullmq - v5.41.8](#minimaljob-bullmq-v5-41-8)
- [MoveToDelayedOpts | bullmq - v5.41.8](#movetodelayedopts-bullmq-v5-41-8)
- [MoveToWaitingChildrenOpts | bullmq - v5.41.8](#movetowaitingchildrenopts-bullmq-v5-41-8)
- [NodeOpts | bullmq - v5.41.8](#nodeopts-bullmq-v5-41-8)
- [ObliterateOpts | bullmq - v5.41.8](#obliterateopts-bullmq-v5-41-8)
- [Parent | bullmq - v5.41.8](#parent-bullmq-v5-41-8)
- [ParentKeys | bullmq - v5.41.8](#parentkeys-bullmq-v5-41-8)
- [ParentMessage | bullmq - v5.41.8](#parentmessage-bullmq-v5-41-8)
- [QueueBaseOptions | bullmq - v5.41.8](#queuebaseoptions-bullmq-v5-41-8)
- [QueueEventsListener | bullmq - v5.41.8](#queueeventslistener-bullmq-v5-41-8)
- [QueueEventsOptions | bullmq - v5.41.8](#queueeventsoptions-bullmq-v5-41-8)
- [QueueListener | bullmq - v5.41.8](#queuelistener-bullmq-v5-41-8)
- [QueueOptions | bullmq - v5.41.8](#queueoptions-bullmq-v5-41-8)
- [RateLimiterOptions | bullmq - v5.41.8](#ratelimiteroptions-bullmq-v5-41-8)
- [RawCommand | bullmq - v5.41.8](#rawcommand-bullmq-v5-41-8)
- [Receiver | bullmq - v5.41.8](#receiver-bullmq-v5-41-8)
- [RepeatOptions | bullmq - v5.41.8](#repeatoptions-bullmq-v5-41-8)
- [SandboxedOptions | bullmq - v5.41.8](#sandboxedoptions-bullmq-v5-41-8)
- [RepeatBaseOptions | bullmq - v5.41.8](#repeatbaseoptions-bullmq-v5-41-8)
- [Span | bullmq - v5.41.8](#span-bullmq-v5-41-8)
- [SandboxedJob | bullmq - v5.41.8](#sandboxedjob-bullmq-v5-41-8)
- [Telemetry | bullmq - v5.41.8](#telemetry-bullmq-v5-41-8)
- [Tracer | bullmq - v5.41.8](#tracer-bullmq-v5-41-8)
- [RetryJobOpts | bullmq - v5.41.8](#retryjobopts-bullmq-v5-41-8)
- [SpanOptions | bullmq - v5.41.8](#spanoptions-bullmq-v5-41-8)
- [WorkerListener | bullmq - v5.41.8](#workerlistener-bullmq-v5-41-8)
- [WorkerOptions | bullmq - v5.41.8](#workeroptions-bullmq-v5-41-8)
- [AttributeValue | bullmq - v5.41.8](#attributevalue-bullmq-v5-41-8)
- [BackoffStrategy | bullmq - v5.41.8](#backoffstrategy-bullmq-v5-41-8)
- [ClusterOptions | bullmq - v5.41.8](#clusteroptions-bullmq-v5-41-8)
- [ConnectionOptions | bullmq - v5.41.8](#connectionoptions-bullmq-v5-41-8)
- [EntryId | bullmq - v5.41.8](#entryid-bullmq-v5-41-8)
- [CompressableJobOptions | bullmq - v5.41.8](#compressablejoboptions-bullmq-v5-41-8)
- [BulkJobOptions | bullmq - v5.41.8](#bulkjoboptions-bullmq-v5-41-8)
- [EntryRaw | bullmq - v5.41.8](#entryraw-bullmq-v5-41-8)
- [Exception | bullmq - v5.41.8](#exception-bullmq-v5-41-8)
- [ExceptionType | bullmq - v5.41.8](#exceptiontype-bullmq-v5-41-8)
- [FinishedPropValAttribute | bullmq - v5.41.8](#finishedpropvalattribute-bullmq-v5-41-8)
- [FinishedStatus | bullmq - v5.41.8](#finishedstatus-bullmq-v5-41-8)
- [FlowJob | bullmq - v5.41.8](#flowjob-bullmq-v5-41-8)
- [FlowQueuesOpts | bullmq - v5.41.8](#flowqueuesopts-bullmq-v5-41-8)
- [FlowChildJob | bullmq - v5.41.8](#flowchildjob-bullmq-v5-41-8)
- [JobData | bullmq - v5.41.8](#jobdata-bullmq-v5-41-8)
- [JobSchedulerTemplateOptions | bullmq - v5.41.8](#jobschedulertemplateoptions-bullmq-v5-41-8)
- [JobJsonSandbox | bullmq - v5.41.8](#jobjsonsandbox-bullmq-v5-41-8)
- [JobType | bullmq - v5.41.8](#jobtype-bullmq-v5-41-8)
- [JobsOptions | bullmq - v5.41.8](#jobsoptions-bullmq-v5-41-8)
- [JobState | bullmq - v5.41.8](#jobstate-bullmq-v5-41-8)
- [KeysMap | bullmq - v5.41.8](#keysmap-bullmq-v5-41-8)
- [MinimalQueue | bullmq - v5.41.8](#minimalqueue-bullmq-v5-41-8)
- [ParentOpts | bullmq - v5.41.8](#parentopts-bullmq-v5-41-8)
- [RedisClient | bullmq - v5.41.8](#redisclient-bullmq-v5-41-8)
- [RedisOptions | bullmq - v5.41.8](#redisoptions-bullmq-v5-41-8)
- [RedisJobOptions | bullmq - v5.41.8](#redisjoboptions-bullmq-v5-41-8)
- [Processor | bullmq - v5.41.8](#processor-bullmq-v5-41-8)
- [RepeatStrategy | bullmq - v5.41.8](#repeatstrategy-bullmq-v5-41-8)
- [RepeatableOptions | bullmq - v5.41.8](#repeatableoptions-bullmq-v5-41-8)
- [RepeatableJob | bullmq - v5.41.8](#repeatablejob-bullmq-v5-41-8)
- [StreamName | bullmq - v5.41.8](#streamname-bullmq-v5-41-8)
- [SandboxedJobProcessor | bullmq - v5.41.8](#sandboxedjobprocessor-bullmq-v5-41-8)
- [StreamReadRaw | bullmq - v5.41.8](#streamreadraw-bullmq-v5-41-8)
- [Time | bullmq - v5.41.8](#time-bullmq-v5-41-8)
- [DELAYED_ERROR | bullmq - v5.41.8](#delayed-error-bullmq-v5-41-8)
- [DELAY_TIME_1 | bullmq - v5.41.8](#delay-time-1-bullmq-v5-41-8)
- [PRIORITY_LIMIT | bullmq - v5.41.8](#priority-limit-bullmq-v5-41-8)
- [DELAY_TIME_5 | bullmq - v5.41.8](#delay-time-5-bullmq-v5-41-8)
- [RATE_LIMIT_ERROR | bullmq - v5.41.8](#rate-limit-error-bullmq-v5-41-8)
- [QUEUE_EVENT_SUFFIX | bullmq - v5.41.8](#queue-event-suffix-bullmq-v5-41-8)
- [UNRECOVERABLE_ERROR | bullmq - v5.41.8](#unrecoverable-error-bullmq-v5-41-8)
- [WAITING_CHILDREN_ERROR | bullmq - v5.41.8](#waiting-children-error-bullmq-v5-41-8)
- [clientCommandMessageReg | bullmq - v5.41.8](#clientcommandmessagereg-bullmq-v5-41-8)
- [errorObject | bullmq - v5.41.8](#errorobject-bullmq-v5-41-8)
- [asyncSend | bullmq - v5.41.8](#asyncsend-bullmq-v5-41-8)
- [array2obj | bullmq - v5.41.8](#array2obj-bullmq-v5-41-8)
- [childSend | bullmq - v5.41.8](#childsend-bullmq-v5-41-8)
- [decreaseMaxListeners | bullmq - v5.41.8](#decreasemaxlisteners-bullmq-v5-41-8)
- [delay | bullmq - v5.41.8](#delay-bullmq-v5-41-8)
- [defaultRepeatStrategy | bullmq - v5.41.8](#defaultrepeatstrategy-bullmq-v5-41-8)
- [errorToJSON | bullmq - v5.41.8](#errortojson-bullmq-v5-41-8)
- [getNextMillis | bullmq - v5.41.8](#getnextmillis-bullmq-v5-41-8)
- [getParentKey | bullmq - v5.41.8](#getparentkey-bullmq-v5-41-8)
- [increaseMaxListeners | bullmq - v5.41.8](#increasemaxlisteners-bullmq-v5-41-8)
---
# v5 | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](v5.html)
Module v5
=========
### Index
### Enumerations
[ChildCommand](../enums/v5.ChildCommand.html)
[ClientType](../enums/v5.ClientType.html)
[ErrorCode](../enums/v5.ErrorCode.html)
[MetricsTime](../enums/v5.MetricsTime.html)
[ParentCommand](../enums/v5.ParentCommand.html)
[SpanKind](../enums/v5.SpanKind.html)
[TelemetryAttributes](../enums/v5.TelemetryAttributes.html)
### Classes
[AsyncFifoQueue](../classes/v5.AsyncFifoQueue.html)
[Backoffs](../classes/v5.Backoffs.html)
[Child](../classes/v5.Child.html)
[ChildPool](../classes/v5.ChildPool.html)
[ChildProcessor](../classes/v5.ChildProcessor.html)
[DelayedError](../classes/v5.DelayedError.html)
[FlowProducer](../classes/v5.FlowProducer.html)
[Job](../classes/v5.Job.html)
[JobScheduler](../classes/v5.JobScheduler.html)
[Queue](../classes/v5.Queue.html)
[QueueBase](../classes/v5.QueueBase.html)
[QueueEvents](../classes/v5.QueueEvents.html)
[QueueEventsProducer](../classes/v5.QueueEventsProducer.html)
[QueueGetters](../classes/v5.QueueGetters.html)
[QueueKeys](../classes/v5.QueueKeys.html)
[RateLimitError](../classes/v5.RateLimitError.html)
[RedisConnection](../classes/v5.RedisConnection.html)
[Repeat](../classes/v5.Repeat.html)
[Scripts](../classes/v5.Scripts.html)
[UnrecoverableError](../classes/v5.UnrecoverableError.html)
[WaitingChildrenError](../classes/v5.WaitingChildrenError.html)
[Worker](../classes/v5.Worker.html)
### Interfaces
[AddChildrenOpts](../interfaces/v5.AddChildrenOpts.html)
[AddNodeOpts](../interfaces/v5.AddNodeOpts.html)
[AdvancedOptions](../interfaces/v5.AdvancedOptions.html)
[AdvancedRepeatOptions](../interfaces/v5.AdvancedRepeatOptions.html)
[Attributes](../interfaces/v5.Attributes.html)
[BackoffOptions](../interfaces/v5.BackoffOptions.html)
[BaseJobOptions](../interfaces/v5.BaseJobOptions.html)
[BaseOptions](../interfaces/v5.BaseOptions.html)
[BuiltInStrategies](../interfaces/v5.BuiltInStrategies.html)
[ChildMessage](../interfaces/v5.ChildMessage.html)
[ContextManager](../interfaces/v5.ContextManager.html)
[DebounceOptions](../interfaces/v5.DebounceOptions.html)
[DefaultJobOptions](../interfaces/v5.DefaultJobOptions.html)
[DependenciesOpts](../interfaces/v5.DependenciesOpts.html)
[FlowJobBase](../interfaces/v5.FlowJobBase.html)
[FlowOpts](../interfaces/v5.FlowOpts.html)
[FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
[GetNextJobOptions](../interfaces/v5.GetNextJobOptions.html)
[IConnection](../interfaces/v5.IConnection.html)
[IoredisListener](../interfaces/v5.IoredisListener.html)
[JobJson](../interfaces/v5.JobJson.html)
[JobJsonRaw](../interfaces/v5.JobJsonRaw.html)
[JobNode](../interfaces/v5.JobNode.html)
[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
[JobSchedulerTemplateJson](../interfaces/v5.JobSchedulerTemplateJson.html)
[KeepJobs](../interfaces/v5.KeepJobs.html)
[Metrics](../interfaces/v5.Metrics.html)
[MetricsOptions](../interfaces/v5.MetricsOptions.html)
[MinimalJob](../interfaces/v5.MinimalJob.html)
[MoveToDelayedOpts](../interfaces/v5.MoveToDelayedOpts.html)
[MoveToWaitingChildrenOpts](../interfaces/v5.MoveToWaitingChildrenOpts.html)
[NodeOpts](../interfaces/v5.NodeOpts.html)
[ObliterateOpts](../interfaces/v5.ObliterateOpts.html)
[Parent](../interfaces/v5.Parent.html)
[ParentKeys](../interfaces/v5.ParentKeys.html)
[ParentMessage](../interfaces/v5.ParentMessage.html)
[QueueBaseOptions](../interfaces/v5.QueueBaseOptions.html)
[QueueEventsListener](../interfaces/v5.QueueEventsListener.html)
[QueueEventsOptions](../interfaces/v5.QueueEventsOptions.html)
[QueueListener](../interfaces/v5.QueueListener.html)
[QueueOptions](../interfaces/v5.QueueOptions.html)
[RateLimiterOptions](../interfaces/v5.RateLimiterOptions.html)
[RawCommand](../interfaces/v5.RawCommand.html)
[Receiver](../interfaces/v5.Receiver.html)
[RepeatBaseOptions](../interfaces/v5.RepeatBaseOptions.html)
[RepeatOptions](../interfaces/v5.RepeatOptions.html)
[RetryJobOpts](../interfaces/v5.RetryJobOpts.html)
[SandboxedJob](../interfaces/v5.SandboxedJob.html)
[SandboxedOptions](../interfaces/v5.SandboxedOptions.html)
[Span](../interfaces/v5.Span.html)
[SpanOptions](../interfaces/v5.SpanOptions.html)
[Telemetry](../interfaces/v5.Telemetry.html)
[Tracer](../interfaces/v5.Tracer.html)
[WorkerListener](../interfaces/v5.WorkerListener.html)
[WorkerOptions](../interfaces/v5.WorkerOptions.html)
### Type Aliases
[AttributeValue](../types/v5.AttributeValue.html)
[BackoffStrategy](../types/v5.BackoffStrategy.html)
[BulkJobOptions](../types/v5.BulkJobOptions.html)
[ClusterOptions](../types/v5.ClusterOptions.html)
[CompressableJobOptions](../types/v5.CompressableJobOptions.html)
[ConnectionOptions](../types/v5.ConnectionOptions.html)
[EntryId](../types/v5.EntryId.html)
[EntryRaw](../types/v5.EntryRaw.html)
[Exception](../types/v5.Exception.html)
[ExceptionType](../types/v5.ExceptionType.html)
[FinishedPropValAttribute](../types/v5.FinishedPropValAttribute.html)
[FinishedStatus](../types/v5.FinishedStatus.html)
[FlowChildJob](../types/v5.FlowChildJob.html)
[FlowJob](../types/v5.FlowJob.html)
[FlowQueuesOpts](../types/v5.FlowQueuesOpts.html)
[JobData](../types/v5.JobData.html)
[JobJsonSandbox](../types/v5.JobJsonSandbox.html)
[JobSchedulerTemplateOptions](../types/v5.JobSchedulerTemplateOptions.html)
[JobState](../types/v5.JobState.html)
[JobType](../types/v5.JobType.html)
[JobsOptions](../types/v5.JobsOptions.html)
[KeysMap](../types/v5.KeysMap.html)
[MinimalQueue](../types/v5.MinimalQueue.html)
[ParentOpts](../types/v5.ParentOpts.html)
[Processor](../types/v5.Processor.html)
[RedisClient](../types/v5.RedisClient.html)
[RedisJobOptions](../types/v5.RedisJobOptions.html)
[RedisOptions](../types/v5.RedisOptions.html)
[RepeatStrategy](../types/v5.RepeatStrategy.html)
[RepeatableJob](../types/v5.RepeatableJob.html)
[RepeatableOptions](../types/v5.RepeatableOptions.html)
[SandboxedJobProcessor](../types/v5.SandboxedJobProcessor.html)
[StreamName](../types/v5.StreamName.html)
[StreamReadRaw](../types/v5.StreamReadRaw.html)
[Time](../types/v5.Time.html)
### Variables
[DELAYED\_ERROR](../variables/v5.DELAYED_ERROR.html)
[DELAY\_TIME\_1](../variables/v5.DELAY_TIME_1.html)
[DELAY\_TIME\_5](../variables/v5.DELAY_TIME_5.html)
[PRIORITY\_LIMIT](../variables/v5.PRIORITY_LIMIT.html)
[QUEUE\_EVENT\_SUFFIX](../variables/v5.QUEUE_EVENT_SUFFIX.html)
[RATE\_LIMIT\_ERROR](../variables/v5.RATE_LIMIT_ERROR.html)
[UNRECOVERABLE\_ERROR](../variables/v5.UNRECOVERABLE_ERROR.html)
[WAITING\_CHILDREN\_ERROR](../variables/v5.WAITING_CHILDREN_ERROR.html)
[clientCommandMessageReg](../variables/v5.clientCommandMessageReg.html)
[errorObject](../variables/v5.errorObject.html)
### Functions
[array2obj](../functions/v5.array2obj.html)
[asyncSend](../functions/v5.asyncSend.html)
[childSend](../functions/v5.childSend.html)
[decreaseMaxListeners](../functions/v5.decreaseMaxListeners.html)
[defaultRepeatStrategy](../functions/v5.defaultRepeatStrategy.html)
[delay](../functions/v5.delay.html)
[errorToJSON](../functions/v5.errorToJSON.html)
[getNextMillis](../functions/v5.getNextMillis.html)
[getParentKey](../functions/v5.getParentKey.html)
[increaseMaxListeners](../functions/v5.increaseMaxListeners.html)
[invertObject](../functions/v5.invertObject.html)
[isEmpty](../functions/v5.isEmpty.html)
[isNotConnectionError](../functions/v5.isNotConnectionError.html)
[isRedisCluster](../functions/v5.isRedisCluster.html)
[isRedisInstance](../functions/v5.isRedisInstance.html)
[isRedisVersionLowerThan](../functions/v5.isRedisVersionLowerThan.html)
[lengthInUtf8Bytes](../functions/v5.lengthInUtf8Bytes.html)
[objectToFlatArray](../functions/v5.objectToFlatArray.html)
[parseObjectValues](../functions/v5.parseObjectValues.html)
[raw2NextJobData](../functions/v5.raw2NextJobData.html)
[removeAllQueueData](../functions/v5.removeAllQueueData.html)
[removeUndefinedFields](../functions/v5.removeUndefinedFields.html)
[toString](../functions/v5.toString.html)
[trace](../functions/v5.trace.html)
[tryCatch](../functions/v5.tryCatch.html)
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
Generated using [TypeDoc](https://typedoc.org/)
---
# ChildCommand | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [ChildCommand](v5.ChildCommand.html)
Enumeration ChildCommand
========================
##### Index
### Enumeration Members
[GetChildrenValuesResponse](v5.ChildCommand.html#GetChildrenValuesResponse)
[Init](v5.ChildCommand.html#Init)
[Start](v5.ChildCommand.html#Start)
[Stop](v5.ChildCommand.html#Stop)
Enumeration Members
-------------------
### GetChildrenValuesResponse[](#GetChildrenValuesResponse)
GetChildrenValuesResponse: 3
### Init[](#Init)
Init: 0
### Start[](#Start)
Start: 1
### Stop[](#Stop)
Stop: 2
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [GetChildrenValuesResponse](#GetChildrenValuesResponse)
* [Init](#Init)
* [Start](#Start)
* [Stop](#Stop)
Generated using [TypeDoc](https://typedoc.org/)
---
# ClientType | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [ClientType](v5.ClientType.html)
Enumeration ClientType
======================
##### Index
### Enumeration Members
[blocking](v5.ClientType.html#blocking)
[normal](v5.ClientType.html#normal)
Enumeration Members
-------------------
### blocking[](#blocking)
blocking: "blocking"
### normal[](#normal)
normal: "normal"
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [blocking](#blocking)
* [normal](#normal)
Generated using [TypeDoc](https://typedoc.org/)
---
# ParentCommand | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [ParentCommand](v5.ParentCommand.html)
Enumeration ParentCommand
=========================
##### Index
### Enumeration Members
[Completed](v5.ParentCommand.html#Completed)
[Error](v5.ParentCommand.html#Error)
[Failed](v5.ParentCommand.html#Failed)
[GetChildrenValues](v5.ParentCommand.html#GetChildrenValues)
[InitCompleted](v5.ParentCommand.html#InitCompleted)
[InitFailed](v5.ParentCommand.html#InitFailed)
[Log](v5.ParentCommand.html#Log)
[MoveToDelayed](v5.ParentCommand.html#MoveToDelayed)
[Progress](v5.ParentCommand.html#Progress)
[Update](v5.ParentCommand.html#Update)
Enumeration Members
-------------------
### Completed[](#Completed)
Completed: 0
### Error[](#Error)
Error: 1
### Failed[](#Failed)
Failed: 2
### GetChildrenValues[](#GetChildrenValues)
GetChildrenValues: 9
### InitCompleted[](#InitCompleted)
InitCompleted: 4
### InitFailed[](#InitFailed)
InitFailed: 3
### Log[](#Log)
Log: 5
### MoveToDelayed[](#MoveToDelayed)
MoveToDelayed: 6
### Progress[](#Progress)
Progress: 7
### Update[](#Update)
Update: 8
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [Completed](#Completed)
* [Error](#Error)
* [Failed](#Failed)
* [GetChildrenValues](#GetChildrenValues)
* [InitCompleted](#InitCompleted)
* [InitFailed](#InitFailed)
* [Log](#Log)
* [MoveToDelayed](#MoveToDelayed)
* [Progress](#Progress)
* [Update](#Update)
Generated using [TypeDoc](https://typedoc.org/)
---
# SpanKind | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [SpanKind](v5.SpanKind.html)
Enumeration SpanKind
====================
##### Index
### Enumeration Members
[CLIENT](v5.SpanKind.html#CLIENT)
[CONSUMER](v5.SpanKind.html#CONSUMER)
[INTERNAL](v5.SpanKind.html#INTERNAL)
[PRODUCER](v5.SpanKind.html#PRODUCER)
[SERVER](v5.SpanKind.html#SERVER)
Enumeration Members
-------------------
### CLIENT[](#CLIENT)
CLIENT: 2
### CONSUMER[](#CONSUMER)
CONSUMER: 4
### INTERNAL[](#INTERNAL)
INTERNAL: 0
### PRODUCER[](#PRODUCER)
PRODUCER: 3
### SERVER[](#SERVER)
SERVER: 1
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [CLIENT](#CLIENT)
* [CONSUMER](#CONSUMER)
* [INTERNAL](#INTERNAL)
* [PRODUCER](#PRODUCER)
* [SERVER](#SERVER)
Generated using [TypeDoc](https://typedoc.org/)
---
# bullmq - v5.41.8
bullmq - v5.41.8
----------------

The fastest, most reliable, Redis-based distributed queue for Node.
Carefully written for rock solid stability and atomicity.
Read the [documentation](https://docs.bullmq.io)
[](https://join.slack.com/t/bullmq/shared_invite/zt-1nbtpk6mv-TItWpF9jf3k4yrCaS0PPZA)
[](https://badge.fury.io/js/bullmq)
[](https://coveralls.io/github/taskforcesh/bullmq?branch=master)
[](https://github.com/semantic-release/semantic-release)
[](https://gurubase.io/g/bullmq)
_Follow [@manast](https://twitter.com/manast)
for \*important\* Bull/BullMQ/BullMQ-Pro news and updates!_
[🛠 Tutorials](#md:🛠-tutorials)
=================================
You can find tutorials and news in this blog: [https://blog.taskforce.sh/](https://blog.taskforce.sh/)
[News 🚀](#md:news-🚀)
=======================
[🌐 Language agnostic BullMQ](#md:🌐-language-agnostic-bullmq)
---------------------------------------------------------------
Do you need to work with BullMQ on platforms other than Node.js? If so, check out the [BullMQ Proxy](https://github.com/taskforcesh/bullmq-proxy)
[Official FrontEnd](#md:official-frontend)
===========================================
[](https://taskforce.sh)
Supercharge your queues with a professional front end:
* Get a complete overview of all your queues.
* Inspect jobs, search, retry, or promote delayed jobs.
* Metrics and statistics.
* and many more features.
Sign up at [Taskforce.sh](https://taskforce.sh)
[🚀 Sponsors 🚀](#md:🚀-sponsors-🚀)
=====================================
| | |
| --- | --- |
| [](https://www.dragonflydb.io/) | Dragonfly is a new Redis™ drop-in replacement that is fully compatible with BullMQ and brings some important advantages over Redis™ such as massive better performance by utilizing all CPU cores available and faster and more memory efficient data structures. Read more [here](https://www.dragonflydb.io/docs/integrations/bullmq)
on how to use it with BullMQ. |
[Used by](#md:used-by)
=======================
Some notable organizations using BullMQ:
| | | | |
| --- | --- | --- | --- |
| [](https://github.com/microsoft/lage) | [](https://github.com/vendure-ecommerce/vendure) | [](https://github.com/datawrapper/datawrapper) | [](https://github.com/nestjs/bull/tree/master/packages/bullmq) |
| [](https://github.com/teamcurri) | [](https://novu.co) | [](https://www.nocodb.com) | [](https://infisical.com/) |
[The gist](#md:the-gist)
=========================
Install:
$ yarn add bullmq
Add jobs to the queue:
import { Queue } from 'bullmq';const queue = new Queue('Paint');queue.add('cars', { color: 'blue' });
Process the jobs in your workers:
import { Worker } from 'bullmq';const worker = new Worker('Paint', async job => { if (job.name === 'cars') { await paintCar(job.data.color); }});
Listen to jobs for completion:
import { QueueEvents } from 'bullmq';const queueEvents = new QueueEvents('Paint');queueEvents.on('completed', ({ jobId }) => { console.log('done painting');});queueEvents.on( 'failed', ({ jobId, failedReason }: { jobId: string; failedReason: string }) => { console.error('error painting', failedReason); },);
This is just scratching the surface, check all the features and more in the official [documentation](https://docs.bullmq.io)
[Feature Comparison](#md:feature-comparison)
=============================================
Since there are a few job queue solutions, here is a table comparing them:
| Feature | [BullMQ-Pro](https://bullmq.io/#bullmq-pro) | [BullMQ](https://bullmq.io) | Bull | Kue | Bee | Agenda |
| --- | --- | --- | --- | --- | --- | --- |
| Backend | redis | redis | redis | redis | redis | mongo |
| Observables | ✓ | | | | | |
| Group Rate Limit | ✓ | | | | | |
| Group Support | ✓ | | | | | |
| Batches Support | ✓ | | | | | |
| Parent/Child Dependencies | ✓ | ✓ | | | | |
| Debouncing | ✓ | ✓ | ✓ | | | |
| Priorities | ✓ | ✓ | ✓ | ✓ | | ✓ |
| Concurrency | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Delayed jobs | ✓ | ✓ | ✓ | ✓ | | ✓ |
| Global events | ✓ | ✓ | ✓ | ✓ | | |
| Rate Limiter | ✓ | ✓ | ✓ | | | |
| Pause/Resume | ✓ | ✓ | ✓ | ✓ | | |
| Sandboxed worker | ✓ | ✓ | ✓ | | | |
| Repeatable jobs | ✓ | ✓ | ✓ | | | ✓ |
| Atomic ops | ✓ | ✓ | ✓ | | ✓ | |
| Persistence | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| UI | ✓ | ✓ | ✓ | ✓ | | ✓ |
| Optimized for | Jobs / Messages | Jobs / Messages | Jobs / Messages | Jobs | Messages | Jobs |
[Contributing](#md:contributing)
---------------------------------
Fork the repo, make some changes, submit a pull-request! Here is the [contributing](https://github.com/taskforcesh/bullmq/blob/master/contributing.md)
doc that has more details.
[Thanks](#md:thanks)
=====================
Thanks for all the contributors that made this library possible, also a special mention to Leon van Kammen that kindly donated his npm bullmq repo.
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* * [🛠 Tutorials](#md:🛠-tutorials)
* [News 🚀](#md:news-🚀)
* * [🌐 Language agnostic BullMQ](#md:🌐-language-agnostic-bullmq)
* [Official FrontEnd](#md:official-frontend)
* [🚀 Sponsors 🚀](#md:🚀-sponsors-🚀)
* [Used by](#md:used-by)
* [The gist](#md:the-gist)
* [Feature Comparison](#md:feature-comparison)
* * [Contributing](#md:contributing)
* [Thanks](#md:thanks)
Generated using [TypeDoc](https://typedoc.org/)
---
# ErrorCode | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [ErrorCode](v5.ErrorCode.html)
Enumeration ErrorCode
=====================
##### Index
### Enumeration Members
[JobBelongsToJobScheduler](v5.ErrorCode.html#JobBelongsToJobScheduler)
[JobLockMismatch](v5.ErrorCode.html#JobLockMismatch)
[JobLockNotExist](v5.ErrorCode.html#JobLockNotExist)
[JobNotExist](v5.ErrorCode.html#JobNotExist)
[JobNotInState](v5.ErrorCode.html#JobNotInState)
[JobPendingDependencies](v5.ErrorCode.html#JobPendingDependencies)
[ParentJobCannotBeReplaced](v5.ErrorCode.html#ParentJobCannotBeReplaced)
[ParentJobNotExist](v5.ErrorCode.html#ParentJobNotExist)
Enumeration Members
-------------------
### JobBelongsToJobScheduler[](#JobBelongsToJobScheduler)
JobBelongsToJobScheduler: \-8
### JobLockMismatch[](#JobLockMismatch)
JobLockMismatch: \-6
### JobLockNotExist[](#JobLockNotExist)
JobLockNotExist: \-2
### JobNotExist[](#JobNotExist)
JobNotExist: \-1
### JobNotInState[](#JobNotInState)
JobNotInState: \-3
### JobPendingDependencies[](#JobPendingDependencies)
JobPendingDependencies: \-4
### ParentJobCannotBeReplaced[](#ParentJobCannotBeReplaced)
ParentJobCannotBeReplaced: \-7
### ParentJobNotExist[](#ParentJobNotExist)
ParentJobNotExist: \-5
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [JobBelongsToJobScheduler](#JobBelongsToJobScheduler)
* [JobLockMismatch](#JobLockMismatch)
* [JobLockNotExist](#JobLockNotExist)
* [JobNotExist](#JobNotExist)
* [JobNotInState](#JobNotInState)
* [JobPendingDependencies](#JobPendingDependencies)
* [ParentJobCannotBeReplaced](#ParentJobCannotBeReplaced)
* [ParentJobNotExist](#ParentJobNotExist)
Generated using [TypeDoc](https://typedoc.org/)
---
# AsyncFifoQueue | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [AsyncFifoQueue](v5.AsyncFifoQueue.html)
Class AsyncFifoQueue
=======================
AsyncFifoQueue
A minimal FIFO queue for asynchronous operations. Allows adding asynchronous operations and consume them in the order they are resolved.
#### Type Parameters
* T
##### Index
### Constructors
[constructor](v5.AsyncFifoQueue.html#constructor)
### Methods
[add](v5.AsyncFifoQueue.html#add)
[fetch](v5.AsyncFifoQueue.html#fetch)
[numPending](v5.AsyncFifoQueue.html#numPending)
[numQueued](v5.AsyncFifoQueue.html#numQueued)
[numTotal](v5.AsyncFifoQueue.html#numTotal)
[waitAll](v5.AsyncFifoQueue.html#waitAll)
Constructors
------------
### constructor[](#constructor)
* new AsyncFifoQueue<[T](v5.AsyncFifoQueue.html#constructor.new_AsyncFifoQueue.T-1)
\>(ignoreErrors?): [AsyncFifoQueue](v5.AsyncFifoQueue.html)
<[T](v5.AsyncFifoQueue.html#constructor.new_AsyncFifoQueue.T-1)
\>[](#constructor.new_AsyncFifoQueue)
* #### Type Parameters
* T
#### Parameters
* ignoreErrors: boolean = false
#### Returns [AsyncFifoQueue](v5.AsyncFifoQueue.html)
<[T](v5.AsyncFifoQueue.html#constructor.new_AsyncFifoQueue.T-1)
\>
Methods
-------
### add[](#add)
* add(promise): void[](#add.add-1)
* #### Parameters
* promise: Promise<[T](v5.AsyncFifoQueue.html#constructor.new_AsyncFifoQueue.T-1)
\>
#### Returns void
### fetch[](#fetch)
* fetch(): Promise[](#fetch.fetch-1)
* #### Returns Promise
### numPending[](#numPending)
* numPending(): number[](#numPending.numPending-1)
* #### Returns number
### numQueued[](#numQueued)
* numQueued(): number[](#numQueued.numQueued-1)
* #### Returns number
### numTotal[](#numTotal)
* numTotal(): number[](#numTotal.numTotal-1)
* #### Returns number
### waitAll[](#waitAll)
* waitAll(): Promise[](#waitAll.waitAll-1)
* #### Returns Promise
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [add](#add)
* [fetch](#fetch)
* [numPending](#numPending)
* [numQueued](#numQueued)
* [numTotal](#numTotal)
* [waitAll](#waitAll)
Generated using [TypeDoc](https://typedoc.org/)
---
# TelemetryAttributes | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [TelemetryAttributes](v5.TelemetryAttributes.html)
Enumeration TelemetryAttributes
===============================
##### Index
### Enumeration Members
[BulkCount](v5.TelemetryAttributes.html#BulkCount)
[BulkNames](v5.TelemetryAttributes.html#BulkNames)
[DeduplicationKey](v5.TelemetryAttributes.html#DeduplicationKey)
[FlowName](v5.TelemetryAttributes.html#FlowName)
[JobFailedReason](v5.TelemetryAttributes.html#JobFailedReason)
[JobFinishedTimestamp](v5.TelemetryAttributes.html#JobFinishedTimestamp)
[JobId](v5.TelemetryAttributes.html#JobId)
[JobIds](v5.TelemetryAttributes.html#JobIds)
[JobKey](v5.TelemetryAttributes.html#JobKey)
[JobName](v5.TelemetryAttributes.html#JobName)
[JobOptions](v5.TelemetryAttributes.html#JobOptions)
[JobProcessedTimestamp](v5.TelemetryAttributes.html#JobProcessedTimestamp)
[JobProgress](v5.TelemetryAttributes.html#JobProgress)
[JobResult](v5.TelemetryAttributes.html#JobResult)
[JobSchedulerId](v5.TelemetryAttributes.html#JobSchedulerId)
[JobType](v5.TelemetryAttributes.html#JobType)
[QueueCleanLimit](v5.TelemetryAttributes.html#QueueCleanLimit)
[QueueDrainDelay](v5.TelemetryAttributes.html#QueueDrainDelay)
[QueueEventMaxLength](v5.TelemetryAttributes.html#QueueEventMaxLength)
[QueueGrace](v5.TelemetryAttributes.html#QueueGrace)
[QueueName](v5.TelemetryAttributes.html#QueueName)
[QueueOperation](v5.TelemetryAttributes.html#QueueOperation)
[QueueOptions](v5.TelemetryAttributes.html#QueueOptions)
[QueueRateLimit](v5.TelemetryAttributes.html#QueueRateLimit)
[WorkerDoNotWaitActive](v5.TelemetryAttributes.html#WorkerDoNotWaitActive)
[WorkerFailedJobs](v5.TelemetryAttributes.html#WorkerFailedJobs)
[WorkerForceClose](v5.TelemetryAttributes.html#WorkerForceClose)
[WorkerId](v5.TelemetryAttributes.html#WorkerId)
[WorkerJobsToExtendLocks](v5.TelemetryAttributes.html#WorkerJobsToExtendLocks)
[WorkerName](v5.TelemetryAttributes.html#WorkerName)
[WorkerOptions](v5.TelemetryAttributes.html#WorkerOptions)
[WorkerRateLimit](v5.TelemetryAttributes.html#WorkerRateLimit)
[WorkerStalledJobs](v5.TelemetryAttributes.html#WorkerStalledJobs)
Enumeration Members
-------------------
### BulkCount[](#BulkCount)
BulkCount: "bullmq.job.bulk.count"
### BulkNames[](#BulkNames)
BulkNames: "bullmq.job.bulk.names"
### DeduplicationKey[](#DeduplicationKey)
DeduplicationKey: "bullmq.job.deduplication.key"
### FlowName[](#FlowName)
FlowName: "bullmq.flow.name"
### JobFailedReason[](#JobFailedReason)
JobFailedReason: "bullmq.job.failed.reason"
### JobFinishedTimestamp[](#JobFinishedTimestamp)
JobFinishedTimestamp: "bullmq.job.finished.timestamp"
### JobId[](#JobId)
JobId: "bullmq.job.id"
### JobIds[](#JobIds)
JobIds: "bullmq.job.ids"
### JobKey[](#JobKey)
JobKey: "bullmq.job.key"
### JobName[](#JobName)
JobName: "bullmq.job.name"
### JobOptions[](#JobOptions)
JobOptions: "bullmq.job.options"
### JobProcessedTimestamp[](#JobProcessedTimestamp)
JobProcessedTimestamp: "bullmq.job.processed.timestamp"
### JobProgress[](#JobProgress)
JobProgress: "bullmq.job.progress"
### JobResult[](#JobResult)
JobResult: "bullmq.job.result"
### JobSchedulerId[](#JobSchedulerId)
JobSchedulerId: "bullmq.job.scheduler.id"
### JobType[](#JobType)
JobType: "bullmq.job.type"
### QueueCleanLimit[](#QueueCleanLimit)
QueueCleanLimit: "bullmq.queue.clean.limit"
### QueueDrainDelay[](#QueueDrainDelay)
QueueDrainDelay: "bullmq.queue.drain.delay"
### QueueEventMaxLength[](#QueueEventMaxLength)
QueueEventMaxLength: "bullmq.queue.event.max.length"
### QueueGrace[](#QueueGrace)
QueueGrace: "bullmq.queue.grace"
### QueueName[](#QueueName)
QueueName: "bullmq.queue.name"
### QueueOperation[](#QueueOperation)
QueueOperation: "bullmq.queue.operation"
### QueueOptions[](#QueueOptions)
QueueOptions: "bullmq.queue.options"
### QueueRateLimit[](#QueueRateLimit)
QueueRateLimit: "bullmq.queue.rate.limit"
### WorkerDoNotWaitActive[](#WorkerDoNotWaitActive)
WorkerDoNotWaitActive: "bullmq.worker.do.not.wait.active"
### WorkerFailedJobs[](#WorkerFailedJobs)
WorkerFailedJobs: "bullmq.worker.failed.jobs"
### WorkerForceClose[](#WorkerForceClose)
WorkerForceClose: "bullmq.worker.force.close"
### WorkerId[](#WorkerId)
WorkerId: "bullmq.worker.id"
### WorkerJobsToExtendLocks[](#WorkerJobsToExtendLocks)
WorkerJobsToExtendLocks: "bullmq.worker.jobs.to.extend.locks"
### WorkerName[](#WorkerName)
WorkerName: "bullmq.worker.name"
### WorkerOptions[](#WorkerOptions)
WorkerOptions: "bullmq.worker.options"
### WorkerRateLimit[](#WorkerRateLimit)
WorkerRateLimit: "bullmq.worker.rate.limit"
### WorkerStalledJobs[](#WorkerStalledJobs)
WorkerStalledJobs: "bullmq.worker.stalled.jobs"
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [BulkCount](#BulkCount)
* [BulkNames](#BulkNames)
* [DeduplicationKey](#DeduplicationKey)
* [FlowName](#FlowName)
* [JobFailedReason](#JobFailedReason)
* [JobFinishedTimestamp](#JobFinishedTimestamp)
* [JobId](#JobId)
* [JobIds](#JobIds)
* [JobKey](#JobKey)
* [JobName](#JobName)
* [JobOptions](#JobOptions)
* [JobProcessedTimestamp](#JobProcessedTimestamp)
* [JobProgress](#JobProgress)
* [JobResult](#JobResult)
* [JobSchedulerId](#JobSchedulerId)
* [JobType](#JobType)
* [QueueCleanLimit](#QueueCleanLimit)
* [QueueDrainDelay](#QueueDrainDelay)
* [QueueEventMaxLength](#QueueEventMaxLength)
* [QueueGrace](#QueueGrace)
* [QueueName](#QueueName)
* [QueueOperation](#QueueOperation)
* [QueueOptions](#QueueOptions)
* [QueueRateLimit](#QueueRateLimit)
* [WorkerDoNotWaitActive](#WorkerDoNotWaitActive)
* [WorkerFailedJobs](#WorkerFailedJobs)
* [WorkerForceClose](#WorkerForceClose)
* [WorkerId](#WorkerId)
* [WorkerJobsToExtendLocks](#WorkerJobsToExtendLocks)
* [WorkerName](#WorkerName)
* [WorkerOptions](#WorkerOptions)
* [WorkerRateLimit](#WorkerRateLimit)
* [WorkerStalledJobs](#WorkerStalledJobs)
Generated using [TypeDoc](https://typedoc.org/)
---
# MetricsTime | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [MetricsTime](v5.MetricsTime.html)
Enumeration MetricsTime
=======================
##### Index
### Enumeration Members
[FIFTEEN\_MINUTES](v5.MetricsTime.html#FIFTEEN_MINUTES)
[FIVE\_MINUTES](v5.MetricsTime.html#FIVE_MINUTES)
[ONE\_HOUR](v5.MetricsTime.html#ONE_HOUR)
[ONE\_MINUTE](v5.MetricsTime.html#ONE_MINUTE)
[ONE\_MONTH](v5.MetricsTime.html#ONE_MONTH)
[ONE\_WEEK](v5.MetricsTime.html#ONE_WEEK)
[THIRTY\_MINUTES](v5.MetricsTime.html#THIRTY_MINUTES)
[TWO\_WEEKS](v5.MetricsTime.html#TWO_WEEKS)
Enumeration Members
-------------------
### FIFTEEN\_MINUTES[](#FIFTEEN_MINUTES)
FIFTEEN\_MINUTES: 15
### FIVE\_MINUTES[](#FIVE_MINUTES)
FIVE\_MINUTES: 5
### ONE\_HOUR[](#ONE_HOUR)
ONE\_HOUR: 60
### ONE\_MINUTE[](#ONE_MINUTE)
ONE\_MINUTE: 1
### ONE\_MONTH[](#ONE_MONTH)
ONE\_MONTH: 80640
### ONE\_WEEK[](#ONE_WEEK)
ONE\_WEEK: 10080
### THIRTY\_MINUTES[](#THIRTY_MINUTES)
THIRTY\_MINUTES: 30
### TWO\_WEEKS[](#TWO_WEEKS)
TWO\_WEEKS: 20160
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [FIFTEEN\_MINUTES](#FIFTEEN_MINUTES)
* [FIVE\_MINUTES](#FIVE_MINUTES)
* [ONE\_HOUR](#ONE_HOUR)
* [ONE\_MINUTE](#ONE_MINUTE)
* [ONE\_MONTH](#ONE_MONTH)
* [ONE\_WEEK](#ONE_WEEK)
* [THIRTY\_MINUTES](#THIRTY_MINUTES)
* [TWO\_WEEKS](#TWO_WEEKS)
Generated using [TypeDoc](https://typedoc.org/)
---
# Backoffs | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [Backoffs](v5.Backoffs.html)
Class Backoffs
==============
##### Index
### Constructors
[constructor](v5.Backoffs.html#constructor)
### Properties
[builtinStrategies](v5.Backoffs.html#builtinStrategies)
### Methods
[calculate](v5.Backoffs.html#calculate)
[normalize](v5.Backoffs.html#normalize)
Constructors
------------
### constructor[](#constructor)
* new Backoffs(): [Backoffs](v5.Backoffs.html)
[](#constructor.new_Backoffs)
* #### Returns [Backoffs](v5.Backoffs.html)
Properties
----------
### `Static` builtinStrategies[](#builtinStrategies)
builtinStrategies: [BuiltInStrategies](../interfaces/v5.BuiltInStrategies.html)
= ...
Methods
-------
### `Static` calculate[](#calculate)
* calculate(backoff, attemptsMade, err, job, customStrategy?): number | Promise[](#calculate.calculate-1)
* #### Parameters
* backoff: [BackoffOptions](../interfaces/v5.BackoffOptions.html)
* attemptsMade: number
* err: Error
* job: [MinimalJob](../interfaces/v5.MinimalJob.html)
* `Optional` customStrategy: [BackoffStrategy](../types/v5.BackoffStrategy.html)
#### Returns number | Promise
### `Static` normalize[](#normalize)
* normalize(backoff): [BackoffOptions](../interfaces/v5.BackoffOptions.html)
[](#normalize.normalize-1)
* #### Parameters
* backoff: number | [BackoffOptions](../interfaces/v5.BackoffOptions.html)
#### Returns [BackoffOptions](../interfaces/v5.BackoffOptions.html)
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [builtinStrategies](#builtinStrategies)
* [calculate](#calculate)
* [normalize](#normalize)
Generated using [TypeDoc](https://typedoc.org/)
---
# Child | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [Child](v5.Child.html)
Class Child
===========
Child class
This class is used to create a child process or worker thread, and allows using isolated processes or threads for processing jobs.
#### Hierarchy
* EventEmitter
* Child
##### Index
### Constructors
[constructor](v5.Child.html#constructor)
### Properties
[childProcess](v5.Child.html#childProcess)
[processFile](v5.Child.html#processFile)
[worker](v5.Child.html#worker)
### Accessors
[exitCode](v5.Child.html#exitCode)
[killed](v5.Child.html#killed)
[pid](v5.Child.html#pid)
[signalCode](v5.Child.html#signalCode)
### Methods
[hasProcessExited](v5.Child.html#hasProcessExited)
[init](v5.Child.html#init)
[kill](v5.Child.html#kill)
[send](v5.Child.html#send)
Constructors
------------
### constructor[](#constructor)
* new Child(mainFile, processFile, opts?): [Child](v5.Child.html)
[](#constructor.new_Child)
* #### Parameters
* mainFile: string
* processFile: string
* opts: [SandboxedOptions](../interfaces/v5.SandboxedOptions.html)
= ...
#### Returns [Child](v5.Child.html)
Properties
----------
### childProcess[](#childProcess)
childProcess: ChildProcess
### processFile[](#processFile)
processFile: string
### worker[](#worker)
worker: Worker
Accessors
---------
### exitCode[](#exitCode)
* get exitCode(): number
* #### Returns number
### killed[](#killed)
* get killed(): boolean
* #### Returns boolean
### pid[](#pid)
* get pid(): number
* #### Returns number
### signalCode[](#signalCode)
* get signalCode(): number
* #### Returns number
Methods
-------
### hasProcessExited[](#hasProcessExited)
* hasProcessExited(): boolean[](#hasProcessExited.hasProcessExited-1)
* #### Returns boolean
### init[](#init)
* init(): Promise[](#init.init-1)
* #### Returns Promise
### kill[](#kill)
* kill(signal?, timeoutMs?): Promise[](#kill.kill-1)
* #### Parameters
* signal: "SIGKILL" | "SIGTERM" = 'SIGKILL'
* `Optional` timeoutMs: number
#### Returns Promise
### send[](#send)
* send(msg): Promise[](#send.send-1)
* #### Parameters
* msg: any
#### Returns Promise
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [childProcess](#childProcess)
* [processFile](#processFile)
* [worker](#worker)
* [exitCode](#exitCode)
* [killed](#killed)
* [pid](#pid)
* [signalCode](#signalCode)
* [hasProcessExited](#hasProcessExited)
* [init](#init)
* [kill](#kill)
* [send](#send)
Generated using [TypeDoc](https://typedoc.org/)
---
# ChildPool | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [ChildPool](v5.ChildPool.html)
Class ChildPool
===============
##### Index
### Constructors
[constructor](v5.ChildPool.html#constructor)
### Properties
[free](v5.ChildPool.html#free)
[retained](v5.ChildPool.html#retained)
### Methods
[clean](v5.ChildPool.html#clean)
[getAllFree](v5.ChildPool.html#getAllFree)
[getFree](v5.ChildPool.html#getFree)
[kill](v5.ChildPool.html#kill)
[release](v5.ChildPool.html#release)
[remove](v5.ChildPool.html#remove)
[retain](v5.ChildPool.html#retain)
Constructors
------------
### constructor[](#constructor)
* new ChildPool(\_\_namedParameters): [ChildPool](v5.ChildPool.html)
[](#constructor.new_ChildPool)
* #### Parameters
* \_\_namedParameters: ChildPoolOpts
#### Returns [ChildPool](v5.ChildPool.html)
Properties
----------
### free[](#free)
free: {
\[key: string\]: [Child](v5.Child.html)
\[\];
} = {}
#### Type declaration
* ##### \[key: string\]: [Child](v5.Child.html)
\[\]
### retained[](#retained)
retained: {
\[key: number\]: [Child](v5.Child.html)
;
} = {}
#### Type declaration
* ##### \[key: number\]: [Child](v5.Child.html)
Methods
-------
### clean[](#clean)
* clean(): Promise[](#clean.clean-1)
* #### Returns Promise
### getAllFree[](#getAllFree)
* getAllFree(): [Child](v5.Child.html)
\[\][](#getAllFree.getAllFree-1)
* #### Returns [Child](v5.Child.html)
\[\]
### getFree[](#getFree)
* getFree(id): [Child](v5.Child.html)
\[\][](#getFree.getFree-1)
* #### Parameters
* id: string
#### Returns [Child](v5.Child.html)
\[\]
### kill[](#kill)
* kill(child, signal?): Promise[](#kill.kill-1)
* #### Parameters
* child: [Child](v5.Child.html)
* signal: "SIGKILL" | "SIGTERM" = 'SIGKILL'
#### Returns Promise
### release[](#release)
* release(child): void[](#release.release-1)
* #### Parameters
* child: [Child](v5.Child.html)
#### Returns void
### remove[](#remove)
* remove(child): void[](#remove.remove-1)
* #### Parameters
* child: [Child](v5.Child.html)
#### Returns void
### retain[](#retain)
* retain(processFile): Promise<[Child](v5.Child.html)
\>[](#retain.retain-1)
* #### Parameters
* processFile: string
#### Returns Promise<[Child](v5.Child.html)
\>
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [free](#free)
* [retained](#retained)
* [clean](#clean)
* [getAllFree](#getAllFree)
* [getFree](#getFree)
* [kill](#kill)
* [release](#release)
* [remove](#remove)
* [retain](#retain)
Generated using [TypeDoc](https://typedoc.org/)
---
# ChildProcessor | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [ChildProcessor](v5.ChildProcessor.html)
Class ChildProcessor
====================
ChildProcessor
This class acts as the interface between a child process and it parent process so that jobs can be processed in different processes.
##### Index
### Constructors
[constructor](v5.ChildProcessor.html#constructor)
### Properties
[currentJobPromise](v5.ChildProcessor.html#currentJobPromise)
[processor](v5.ChildProcessor.html#processor)
[status?](v5.ChildProcessor.html#status)
### Methods
[init](v5.ChildProcessor.html#init)
[start](v5.ChildProcessor.html#start)
[stop](v5.ChildProcessor.html#stop)
[waitForCurrentJobAndExit](v5.ChildProcessor.html#waitForCurrentJobAndExit)
Constructors
------------
### constructor[](#constructor)
* new ChildProcessor(send, receiver): [ChildProcessor](v5.ChildProcessor.html)
[](#constructor.new_ChildProcessor)
* #### Parameters
* send: ((msg) => Promise)
* * (msg): Promise
* #### Parameters
* msg: any
#### Returns Promise
* receiver: [Receiver](../interfaces/v5.Receiver.html)
#### Returns [ChildProcessor](v5.ChildProcessor.html)
Properties
----------
### currentJobPromise[](#currentJobPromise)
currentJobPromise: Promise
### processor[](#processor)
processor: any
### `Optional` status[](#status)
status?: ChildStatus
Methods
-------
### init[](#init)
* init(processorFile): Promise[](#init.init-1)
* #### Parameters
* processorFile: string
#### Returns Promise
### start[](#start)
* start(jobJson, token?): Promise[](#start.start-1)
* #### Parameters
* jobJson: [JobJsonSandbox](../types/v5.JobJsonSandbox.html)
* `Optional` token: string
#### Returns Promise
### stop[](#stop)
* stop(): Promise[](#stop.stop-1)
* #### Returns Promise
### waitForCurrentJobAndExit[](#waitForCurrentJobAndExit)
* waitForCurrentJobAndExit(): Promise[](#waitForCurrentJobAndExit.waitForCurrentJobAndExit-1)
* #### Returns Promise
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [currentJobPromise](#currentJobPromise)
* [processor](#processor)
* [status](#status)
* [init](#init)
* [start](#start)
* [stop](#stop)
* [waitForCurrentJobAndExit](#waitForCurrentJobAndExit)
Generated using [TypeDoc](https://typedoc.org/)
---
# DelayedError | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [DelayedError](v5.DelayedError.html)
Class DelayedError
==================
DelayedError
Error to be thrown when job is moved to delayed state from job in active state.
#### Hierarchy
* Error
* DelayedError
##### Index
### Constructors
[constructor](v5.DelayedError.html#constructor)
Constructors
------------
### constructor[](#constructor)
* new DelayedError(message?): [DelayedError](v5.DelayedError.html)
[](#constructor.new_DelayedError)
* #### Parameters
* message: string = DELAYED\_ERROR
#### Returns [DelayedError](v5.DelayedError.html)
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
Generated using [TypeDoc](https://typedoc.org/)
---
# v4 | bullmq - v5.41.8
* [bullmq](../index.html)
* [v4](v4.html)
Module v4
=========
### Index
### Enumerations
[ChildCommand](../enums/v4.ChildCommand.html)
[ClientType](../enums/v4.ClientType.html)
[ErrorCode](../enums/v4.ErrorCode.html)
[MetricsTime](../enums/v4.MetricsTime.html)
[ParentCommand](../enums/v4.ParentCommand.html)
### Classes
[AsyncFifoQueue](../classes/v4.AsyncFifoQueue.html)
[Backoffs](../classes/v4.Backoffs.html)
[ChildPool](../classes/v4.ChildPool.html)
[ChildProcessor](../classes/v4.ChildProcessor.html)
[DelayedError](../classes/v4.DelayedError.html)
[FlowProducer](../classes/v4.FlowProducer.html)
[Job](../classes/v4.Job.html)
[Queue](../classes/v4.Queue.html)
[QueueBase](../classes/v4.QueueBase.html)
[QueueEvents](../classes/v4.QueueEvents.html)
[QueueGetters](../classes/v4.QueueGetters.html)
[QueueKeys](../classes/v4.QueueKeys.html)
[RateLimitError](../classes/v4.RateLimitError.html)
[RedisConnection](../classes/v4.RedisConnection.html)
[Repeat](../classes/v4.Repeat.html)
[ScriptLoader](../classes/v4.ScriptLoader.html)
[ScriptLoaderError](../classes/v4.ScriptLoaderError.html)
[Scripts](../classes/v4.Scripts.html)
[UnrecoverableError](../classes/v4.UnrecoverableError.html)
[WaitingChildrenError](../classes/v4.WaitingChildrenError.html)
[Worker](../classes/v4.Worker.html)
### Interfaces
[AddChildrenOpts](../interfaces/v4.AddChildrenOpts.html)
[AddNodeOpts](../interfaces/v4.AddNodeOpts.html)
[AdvancedOptions](../interfaces/v4.AdvancedOptions.html)
[AdvancedRepeatOptions](../interfaces/v4.AdvancedRepeatOptions.html)
[BackoffOptions](../interfaces/v4.BackoffOptions.html)
[BaseJobOptions](../interfaces/v4.BaseJobOptions.html)
[BaseOptions](../interfaces/v4.BaseOptions.html)
[BuiltInStrategies](../interfaces/v4.BuiltInStrategies.html)
[ChildMessage](../interfaces/v4.ChildMessage.html)
[Command](../interfaces/v4.Command.html)
[DefaultJobOptions](../interfaces/v4.DefaultJobOptions.html)
[DependenciesOpts](../interfaces/v4.DependenciesOpts.html)
[FlowJobBase](../interfaces/v4.FlowJobBase.html)
[FlowOpts](../interfaces/v4.FlowOpts.html)
[FlowProducerListener](../interfaces/v4.FlowProducerListener.html)
[GetNextJobOptions](../interfaces/v4.GetNextJobOptions.html)
[IConnection](../interfaces/v4.IConnection.html)
[IoredisListener](../interfaces/v4.IoredisListener.html)
[JobJson](../interfaces/v4.JobJson.html)
[JobJsonRaw](../interfaces/v4.JobJsonRaw.html)
[JobNode](../interfaces/v4.JobNode.html)
[KeepJobs](../interfaces/v4.KeepJobs.html)
[Metrics](../interfaces/v4.Metrics.html)
[MetricsOptions](../interfaces/v4.MetricsOptions.html)
[MinimalJob](../interfaces/v4.MinimalJob.html)
[MoveToWaitingChildrenOpts](../interfaces/v4.MoveToWaitingChildrenOpts.html)
[NodeOpts](../interfaces/v4.NodeOpts.html)
[ObliterateOpts](../interfaces/v4.ObliterateOpts.html)
[Parent](../interfaces/v4.Parent.html)
[ParentKeys](../interfaces/v4.ParentKeys.html)
[ParentMessage](../interfaces/v4.ParentMessage.html)
[QueueBaseOptions](../interfaces/v4.QueueBaseOptions.html)
[QueueEventsListener](../interfaces/v4.QueueEventsListener.html)
[QueueEventsOptions](../interfaces/v4.QueueEventsOptions.html)
[QueueListener](../interfaces/v4.QueueListener.html)
[QueueOptions](../interfaces/v4.QueueOptions.html)
[RateLimiterOptions](../interfaces/v4.RateLimiterOptions.html)
[RawCommand](../interfaces/v4.RawCommand.html)
[RepeatBaseOptions](../interfaces/v4.RepeatBaseOptions.html)
[RepeatOptions](../interfaces/v4.RepeatOptions.html)
[SandboxedJob](../interfaces/v4.SandboxedJob.html)
[ScriptMetadata](../interfaces/v4.ScriptMetadata.html)
[WorkerListener](../interfaces/v4.WorkerListener.html)
[WorkerOptions](../interfaces/v4.WorkerOptions.html)
### Type Aliases
[BackoffStrategy](../types/v4.BackoffStrategy.html)
[BulkJobOptions](../types/v4.BulkJobOptions.html)
[ClusterOptions](../types/v4.ClusterOptions.html)
[ConnectionOptions](../types/v4.ConnectionOptions.html)
[EntryId](../types/v4.EntryId.html)
[EntryRaw](../types/v4.EntryRaw.html)
[FinishedPropValAttribute](../types/v4.FinishedPropValAttribute.html)
[FinishedStatus](../types/v4.FinishedStatus.html)
[FlowChildJob](../types/v4.FlowChildJob.html)
[FlowJob](../types/v4.FlowJob.html)
[FlowQueuesOpts](../types/v4.FlowQueuesOpts.html)
[JobData](../types/v4.JobData.html)
[JobJsonSandbox](../types/v4.JobJsonSandbox.html)
[JobState](../types/v4.JobState.html)
[JobType](../types/v4.JobType.html)
[JobsOptions](../types/v4.JobsOptions.html)
[KeysMap](../types/v4.KeysMap.html)
[MinimalQueue](../types/v4.MinimalQueue.html)
[ParentOpts](../types/v4.ParentOpts.html)
[Processor](../types/v4.Processor.html)
[RedisClient](../types/v4.RedisClient.html)
[RedisJobOptions](../types/v4.RedisJobOptions.html)
[RedisOptions](../types/v4.RedisOptions.html)
[RepeatStrategy](../types/v4.RepeatStrategy.html)
[RepeatableJob](../types/v4.RepeatableJob.html)
[SandboxedJobProcessor](../types/v4.SandboxedJobProcessor.html)
[StreamName](../types/v4.StreamName.html)
[StreamReadRaw](../types/v4.StreamReadRaw.html)
### Variables
[DELAY\_TIME\_1](../variables/v4.DELAY_TIME_1.html)
[DELAY\_TIME\_5](../variables/v4.DELAY_TIME_5.html)
[PRIORITY\_LIMIT](../variables/v4.PRIORITY_LIMIT.html)
[QUEUE\_EVENT\_SUFFIX](../variables/v4.QUEUE_EVENT_SUFFIX.html)
[RATE\_LIMIT\_ERROR](../variables/v4.RATE_LIMIT_ERROR.html)
[WORKER\_SUFFIX](../variables/v4.WORKER_SUFFIX.html)
[clientCommandMessageReg](../variables/v4.clientCommandMessageReg.html)
[errorObject](../variables/v4.errorObject.html)
[scriptLoader](../variables/v4.scriptLoader-1.html)
### Functions
[array2obj](../functions/v4.array2obj.html)
[asyncSend](../functions/v4.asyncSend.html)
[childSend](../functions/v4.childSend.html)
[decreaseMaxListeners](../functions/v4.decreaseMaxListeners.html)
[delay](../functions/v4.delay.html)
[errorToJSON](../functions/v4.errorToJSON.html)
[getNextMillis](../functions/v4.getNextMillis.html)
[getParentKey](../functions/v4.getParentKey.html)
[increaseMaxListeners](../functions/v4.increaseMaxListeners.html)
[isEmpty](../functions/v4.isEmpty.html)
[isNotConnectionError](../functions/v4.isNotConnectionError.html)
[isRedisCluster](../functions/v4.isRedisCluster.html)
[isRedisInstance](../functions/v4.isRedisInstance.html)
[isRedisVersionLowerThan](../functions/v4.isRedisVersionLowerThan.html)
[lengthInUtf8Bytes](../functions/v4.lengthInUtf8Bytes.html)
[parseObjectValues](../functions/v4.parseObjectValues.html)
[raw2NextJobData](../functions/v4.raw2NextJobData.html)
[removeAllQueueData](../functions/v4.removeAllQueueData.html)
[tryCatch](../functions/v4.tryCatch.html)
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
Generated using [TypeDoc](https://typedoc.org/)
---
# FlowProducer | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [FlowProducer](v5.FlowProducer.html)
Class FlowProducer
==================
This class allows to add jobs with dependencies between them in such a way that it is possible to build complex flows. Note: A flow is a tree-like structure of jobs that depend on each other. Whenever the children of a given parent are completed, the parent will be processed, being able to access the children's result data. All Jobs can be in different queues, either children or parents,
#### Hierarchy
* EventEmitter
* FlowProducer
##### Index
### Constructors
[constructor](v5.FlowProducer.html#constructor)
### Properties
[closing](v5.FlowProducer.html#closing)
[keys](v5.FlowProducer.html#keys)
[opts](v5.FlowProducer.html#opts)
[queueKeys](v5.FlowProducer.html#queueKeys)
[toKey](v5.FlowProducer.html#toKey)
### Accessors
[client](v5.FlowProducer.html#client)
### Methods
[add](v5.FlowProducer.html#add)
[addBulk](v5.FlowProducer.html#addBulk)
[close](v5.FlowProducer.html#close)
[disconnect](v5.FlowProducer.html#disconnect)
[emit](v5.FlowProducer.html#emit)
[getFlow](v5.FlowProducer.html#getFlow)
[off](v5.FlowProducer.html#off)
[on](v5.FlowProducer.html#on)
[once](v5.FlowProducer.html#once)
[waitUntilReady](v5.FlowProducer.html#waitUntilReady)
Constructors
------------
### constructor[](#constructor)
* new FlowProducer(opts?, Connection?): [FlowProducer](v5.FlowProducer.html)
[](#constructor.new_FlowProducer)
* #### Parameters
* opts: [QueueBaseOptions](../interfaces/v5.QueueBaseOptions.html)
= ...
* Connection: typeof [RedisConnection](v5.RedisConnection.html)
= RedisConnection
#### Returns [FlowProducer](v5.FlowProducer.html)
Properties
----------
### closing[](#closing)
closing: Promise
### keys[](#keys)
keys: [KeysMap](../types/v5.KeysMap.html)
### opts[](#opts)
opts: [QueueBaseOptions](../interfaces/v5.QueueBaseOptions.html)
= ...
### queueKeys[](#queueKeys)
queueKeys: [QueueKeys](v5.QueueKeys.html)
### toKey[](#toKey)
toKey: ((name, type) => string)
#### Type declaration
* * (name, type): string
* #### Parameters
* name: string
* type: string
#### Returns string
Accessors
---------
### client[](#client)
* get client(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>
* Returns a promise that resolves to a redis client. Normally used only by subclasses.
#### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
Methods
-------
### add[](#add)
* add(flow, opts?): Promise<[JobNode](../interfaces/v5.JobNode.html)
\>[](#add.add-1)
* Adds a flow.
This call would be atomic, either it fails and no jobs will be added to the queues, or it succeeds and all jobs will be added.
#### Parameters
* flow: [FlowJob](../types/v5.FlowJob.html)
an object with a tree-like structure where children jobs will be processed before their parents.
* `Optional` opts: [FlowOpts](../interfaces/v5.FlowOpts.html)
options that will be applied to the flow object.
#### Returns Promise<[JobNode](../interfaces/v5.JobNode.html)
\>
### addBulk[](#addBulk)
* addBulk(flows): Promise<[JobNode](../interfaces/v5.JobNode.html)
\[\]\>[](#addBulk.addBulk-1)
* Adds multiple flows.
A flow is a tree-like structure of jobs that depend on each other. Whenever the children of a given parent are completed, the parent will be processed, being able to access the children's result data.
All Jobs can be in different queues, either children or parents, however this call would be atomic, either it fails and no jobs will be added to the queues, or it succeeds and all jobs will be added.
#### Parameters
* flows: [FlowJob](../types/v5.FlowJob.html)
\[\]
an array of objects with a tree-like structure where children jobs will be processed before their parents.
#### Returns Promise<[JobNode](../interfaces/v5.JobNode.html)
\[\]\>
### close[](#close)
* close(): Promise[](#close.close-1)
* Closes the connection and returns a promise that resolves when the connection is closed.
#### Returns Promise
### disconnect[](#disconnect)
* disconnect(): Promise[](#disconnect.disconnect-1)
* Force disconnects a connection.
#### Returns Promise
### emit[](#emit)
* emit<[U](v5.FlowProducer.html#emit.emit-1.U)
\>(event, ...args): boolean[](#emit.emit-1)
* #### Type Parameters
* U extends keyof [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
#### Parameters
* event: [U](v5.FlowProducer.html#emit.emit-1.U)
* `Rest` ...args: Parameters<[FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
\[[U](v5.FlowProducer.html#emit.emit-1.U)\
\]\>
#### Returns boolean
### getFlow[](#getFlow)
* getFlow(opts): Promise<[JobNode](../interfaces/v5.JobNode.html)
\>[](#getFlow.getFlow-1)
* Get a flow.
#### Parameters
* opts: [NodeOpts](../interfaces/v5.NodeOpts.html)
an object with options for getting a JobNode.
#### Returns Promise<[JobNode](../interfaces/v5.JobNode.html)
\>
### off[](#off)
* off<[U](v5.FlowProducer.html#off.off-1.U-1)
\>(eventName, listener): this[](#off.off-1)
* #### Type Parameters
* U extends keyof [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
#### Parameters
* eventName: [U](v5.FlowProducer.html#off.off-1.U-1)
* listener: [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
\[[U](v5.FlowProducer.html#off.off-1.U-1)\
\]
#### Returns this
### on[](#on)
* on<[U](v5.FlowProducer.html#on.on-1.U-2)
\>(event, listener): this[](#on.on-1)
* #### Type Parameters
* U extends keyof [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
#### Parameters
* event: [U](v5.FlowProducer.html#on.on-1.U-2)
* listener: [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
\[[U](v5.FlowProducer.html#on.on-1.U-2)\
\]
#### Returns this
### once[](#once)
* once<[U](v5.FlowProducer.html#once.once-1.U-3)
\>(event, listener): this[](#once.once-1)
* #### Type Parameters
* U extends keyof [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
#### Parameters
* event: [U](v5.FlowProducer.html#once.once-1.U-3)
* listener: [FlowProducerListener](../interfaces/v5.FlowProducerListener.html)
\[[U](v5.FlowProducer.html#once.once-1.U-3)\
\]
#### Returns this
### waitUntilReady[](#waitUntilReady)
* waitUntilReady(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>[](#waitUntilReady.waitUntilReady-1)
* #### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [closing](#closing)
* [keys](#keys)
* [opts](#opts)
* [queueKeys](#queueKeys)
* [toKey](#toKey)
* [client](#client)
* [add](#add)
* [addBulk](#addBulk)
* [close](#close)
* [disconnect](#disconnect)
* [emit](#emit)
* [getFlow](#getFlow)
* [off](#off)
* [on](#on)
* [once](#once)
* [waitUntilReady](#waitUntilReady)
Generated using [TypeDoc](https://typedoc.org/)
---
# v3 | bullmq - v5.41.8
* [bullmq](../index.html)
* [v3](v3.html)
Module v3
=========
##### Index
### Enumerations
[ChildCommand](../enums/v3.ChildCommand.html)
[ClientType](../enums/v3.ClientType.html)
[ErrorCode](../enums/v3.ErrorCode.html)
[MetricsTime](../enums/v3.MetricsTime.html)
[ParentCommand](../enums/v3.ParentCommand.html)
### Classes
[AsyncFifoQueue](../classes/v3.AsyncFifoQueue.html)
[Backoffs](../classes/v3.Backoffs.html)
[ChildPool](../classes/v3.ChildPool.html)
[ChildProcessor](../classes/v3.ChildProcessor.html)
[DelayedError](../classes/v3.DelayedError.html)
[FlowProducer](../classes/v3.FlowProducer.html)
[Job](../classes/v3.Job.html)
[Queue](../classes/v3.Queue.html)
[QueueBase](../classes/v3.QueueBase.html)
[QueueEvents](../classes/v3.QueueEvents.html)
[QueueGetters](../classes/v3.QueueGetters.html)
[QueueKeys](../classes/v3.QueueKeys.html)
[RedisConnection](../classes/v3.RedisConnection.html)
[Repeat](../classes/v3.Repeat.html)
[ScriptLoader](../classes/v3.ScriptLoader.html)
[ScriptLoaderError](../classes/v3.ScriptLoaderError.html)
[Scripts](../classes/v3.Scripts.html)
[UnrecoverableError](../classes/v3.UnrecoverableError.html)
[WaitingChildrenError](../classes/v3.WaitingChildrenError.html)
[Worker](../classes/v3.Worker.html)
### Interfaces
[AddChildrenOpts](../interfaces/v3.AddChildrenOpts.html)
[AddNodeOpts](../interfaces/v3.AddNodeOpts.html)
[AdvancedOptions](../interfaces/v3.AdvancedOptions.html)
[AdvancedRepeatOptions](../interfaces/v3.AdvancedRepeatOptions.html)
[BackoffOptions](../interfaces/v3.BackoffOptions.html)
[BaseJobOptions](../interfaces/v3.BaseJobOptions.html)
[BaseOptions](../interfaces/v3.BaseOptions.html)
[BuiltInStrategies](../interfaces/v3.BuiltInStrategies.html)
[ChildMessage](../interfaces/v3.ChildMessage.html)
[Command](../interfaces/v3.Command.html)
[DefaultJobOptions](../interfaces/v3.DefaultJobOptions.html)
[DependenciesOpts](../interfaces/v3.DependenciesOpts.html)
[FlowJobBase](../interfaces/v3.FlowJobBase.html)
[FlowOpts](../interfaces/v3.FlowOpts.html)
[FlowProducerListener](../interfaces/v3.FlowProducerListener.html)
[GetNextJobOptions](../interfaces/v3.GetNextJobOptions.html)
[IConnection](../interfaces/v3.IConnection.html)
[IoredisListener](../interfaces/v3.IoredisListener.html)
[JobJson](../interfaces/v3.JobJson.html)
[JobJsonRaw](../interfaces/v3.JobJsonRaw.html)
[JobNode](../interfaces/v3.JobNode.html)
[KeepJobs](../interfaces/v3.KeepJobs.html)
[Metrics](../interfaces/v3.Metrics.html)
[MetricsOptions](../interfaces/v3.MetricsOptions.html)
[MinimalJob](../interfaces/v3.MinimalJob.html)
[MoveToWaitingChildrenOpts](../interfaces/v3.MoveToWaitingChildrenOpts.html)
[NodeOpts](../interfaces/v3.NodeOpts.html)
[ObliterateOpts](../interfaces/v3.ObliterateOpts.html)
[Parent](../interfaces/v3.Parent.html)
[ParentKeys](../interfaces/v3.ParentKeys.html)
[ParentMessage](../interfaces/v3.ParentMessage.html)
[QueueBaseOptions](../interfaces/v3.QueueBaseOptions.html)
[QueueEventsListener](../interfaces/v3.QueueEventsListener.html)
[QueueEventsOptions](../interfaces/v3.QueueEventsOptions.html)
[QueueListener](../interfaces/v3.QueueListener.html)
[QueueOptions](../interfaces/v3.QueueOptions.html)
[RateLimiterOptions](../interfaces/v3.RateLimiterOptions.html)
[RawCommand](../interfaces/v3.RawCommand.html)
[RepeatBaseOptions](../interfaces/v3.RepeatBaseOptions.html)
[RepeatOptions](../interfaces/v3.RepeatOptions.html)
[SandboxedJob](../interfaces/v3.SandboxedJob.html)
[ScriptMetadata](../interfaces/v3.ScriptMetadata.html)
[WorkerListener](../interfaces/v3.WorkerListener.html)
[WorkerOptions](../interfaces/v3.WorkerOptions.html)
### Type Aliases
[BackoffStrategy](v3.html#BackoffStrategy)
[BulkJobOptions](v3.html#BulkJobOptions)
[ClusterOptions](v3.html#ClusterOptions)
[ConnectionOptions](v3.html#ConnectionOptions)
[EntryId](v3.html#EntryId)
[EntryRaw](v3.html#EntryRaw)
[FinishedPropValAttribute](v3.html#FinishedPropValAttribute)
[FinishedStatus](v3.html#FinishedStatus)
[FlowChildJob](v3.html#FlowChildJob)
[FlowJob](v3.html#FlowJob)
[FlowQueuesOpts](v3.html#FlowQueuesOpts)
[JobData](v3.html#JobData)
[JobJsonSandbox](v3.html#JobJsonSandbox)
[JobState](v3.html#JobState)
[JobType](v3.html#JobType)
[JobsOptions](v3.html#JobsOptions)
[KeysMap](v3.html#KeysMap)
[MinimalQueue](v3.html#MinimalQueue)
[ParentOpts](v3.html#ParentOpts)
[Processor](v3.html#Processor)
[RedisClient](v3.html#RedisClient)
[RedisJobOptions](v3.html#RedisJobOptions)
[RedisOptions](v3.html#RedisOptions)
[RepeatStrategy](v3.html#RepeatStrategy)
[SandboxedJobProcessor](v3.html#SandboxedJobProcessor)
[StreamName](v3.html#StreamName)
[StreamReadRaw](v3.html#StreamReadRaw)
### Variables
[DELAY\_TIME\_1](../variables/v3.DELAY_TIME_1.html)
[DELAY\_TIME\_5](../variables/v3.DELAY_TIME_5.html)
[QUEUE\_EVENT\_SUFFIX](../variables/v3.QUEUE_EVENT_SUFFIX.html)
[WORKER\_SUFFIX](../variables/v3.WORKER_SUFFIX.html)
[clientCommandMessageReg](../variables/v3.clientCommandMessageReg.html)
[errorObject](../variables/v3.errorObject.html)
[scriptLoader](../variables/v3.scriptLoader-1.html)
### Functions
[array2obj](../functions/v3.array2obj.html)
[asyncSend](../functions/v3.asyncSend.html)
[childSend](../functions/v3.childSend.html)
[delay](../functions/v3.delay.html)
[errorToJSON](../functions/v3.errorToJSON.html)
[getNextMillis](../functions/v3.getNextMillis.html)
[getParentKey](../functions/v3.getParentKey.html)
[isEmpty](../functions/v3.isEmpty.html)
[isNotConnectionError](../functions/v3.isNotConnectionError.html)
[isRedisCluster](../functions/v3.isRedisCluster.html)
[isRedisInstance](../functions/v3.isRedisInstance.html)
[isRedisVersionLowerThan](../functions/v3.isRedisVersionLowerThan.html)
[lengthInUtf8Bytes](../functions/v3.lengthInUtf8Bytes.html)
[parseObjectValues](../functions/v3.parseObjectValues.html)
[raw2NextJobData](../functions/v3.raw2NextJobData.html)
[removeAllQueueData](../functions/v3.removeAllQueueData.html)
[tryCatch](../functions/v3.tryCatch.html)
Type Aliases
------------
### BackoffStrategy[](#BackoffStrategy)
BackoffStrategy: ((attemptsMade, type?, err?, job?) => Promise | number)
#### Type declaration
* * (attemptsMade, type?, err?, job?): Promise | number
* #### Parameters
* attemptsMade: number
* `Optional` type: string
* `Optional` err: Error
* `Optional` job: [MinimalJob](../interfaces/v3.MinimalJob.html)
#### Returns Promise | number
### BulkJobOptions[](#BulkJobOptions)
BulkJobOptions: Omit<[JobsOptions](v3.html#JobsOptions)
, "repeat"\>
### ClusterOptions[](#ClusterOptions)
ClusterOptions: IORedis.ClusterOptions & [BaseOptions](../interfaces/v3.BaseOptions.html)
### ConnectionOptions[](#ConnectionOptions)
ConnectionOptions: [RedisOptions](v3.html#RedisOptions)
| [ClusterOptions](v3.html#ClusterOptions)
| IORedis.Redis | IORedis.Cluster
### EntryId[](#EntryId)
EntryId: string
### EntryRaw[](#EntryRaw)
EntryRaw: \[[EntryId](v3.html#EntryId)\
, string\[\]\]
### FinishedPropValAttribute[](#FinishedPropValAttribute)
FinishedPropValAttribute: "returnvalue" | "failedReason"
### FinishedStatus[](#FinishedStatus)
FinishedStatus: "completed" | "failed"
### FlowChildJob[](#FlowChildJob)
FlowChildJob: [FlowJobBase](../interfaces/v3.FlowJobBase.html)
\>
### FlowJob[](#FlowJob)
FlowJob: [FlowJobBase](../interfaces/v3.FlowJobBase.html)
<[JobsOptions](v3.html#JobsOptions)
\>
### FlowQueuesOpts[](#FlowQueuesOpts)
FlowQueuesOpts: Record\>
### JobData[](#JobData)
JobData: \[[JobJsonRaw](../interfaces/v3.JobJsonRaw.html)\
| number, string?\]
### JobJsonSandbox[](#JobJsonSandbox)
JobJsonSandbox: [JobJson](../interfaces/v3.JobJson.html)
& {
prefix: string;
queueName: string;
}
#### Type declaration
* ##### prefix: string
* ##### queueName: string
### JobState[](#JobState)
JobState: [FinishedStatus](v3.html#FinishedStatus)
| "active" | "delayed" | "waiting" | "waiting-children"
### JobType[](#JobType)
JobType: [JobState](v3.html#JobState)
| "paused" | "repeat" | "wait"
### JobsOptions[](#JobsOptions)
JobsOptions: [BaseJobOptions](../interfaces/v3.BaseJobOptions.html)
& {
failParentOnFailure?: boolean;
}
#### Type declaration
* ##### `Optional` failParentOnFailure?: boolean
If true, moves parent to failed.
### KeysMap[](#KeysMap)
KeysMap: {
\[index in string\]: string
}
### MinimalQueue[](#MinimalQueue)
MinimalQueue: Pick<[QueueBase](../classes/v3.QueueBase.html)
, "name" | "client" | "toKey" | "keys" | "opts" | "closing" | "waitUntilReady" | "removeListener" | "emit" | "on" | "redisVersion"\>
### ParentOpts[](#ParentOpts)
ParentOpts: {
parentDependenciesKey?: string;
parentKey?: string;
waitChildrenKey?: string;
}
#### Type declaration
* ##### `Optional` parentDependenciesKey?: string
* ##### `Optional` parentKey?: string
* ##### `Optional` waitChildrenKey?: string
### Processor[](#Processor)
Processor<[T](v3.html#Processor.T)
, [R](v3.html#Processor.R)
, [N](v3.html#Processor.N)
\>: ((job, token?) => Promise)
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Type declaration
* * (job, token?): Promise
* An async function that receives `Job`s and handles them.
#### Parameters
* job: [Job](../classes/v3.Job.html)
* `Optional` token: string
#### Returns Promise
### RedisClient[](#RedisClient)
RedisClient: Redis | Cluster
### RedisJobOptions[](#RedisJobOptions)
RedisJobOptions: [BaseJobOptions](../interfaces/v3.BaseJobOptions.html)
& {
fpof?: boolean;
kl?: number;
}
These fields are the ones stored in Redis with smaller keys for compactness.
#### Type declaration
* ##### `Optional` fpof?: boolean
If true, moves parent to failed.
* ##### `Optional` kl?: number
Maximum amount of log entries that will be preserved
### RedisOptions[](#RedisOptions)
RedisOptions: IORedis.RedisOptions & [BaseOptions](../interfaces/v3.BaseOptions.html)
### RepeatStrategy[](#RepeatStrategy)
RepeatStrategy: ((millis, opts, name?) => number)
#### Type declaration
* * (millis, opts, name?): number
* #### Parameters
* millis: number
* opts: [RepeatOptions](../interfaces/v3.RepeatOptions.html)
* `Optional` name: string
#### Returns number
### SandboxedJobProcessor[](#SandboxedJobProcessor)
SandboxedJobProcessor<[T](v3.html#SandboxedJobProcessor.T-1)
, [R](v3.html#SandboxedJobProcessor.R-1)
\>: ((job) => R | PromiseLike) | ((job, callback) => void)
#### Type Parameters
* T = any
* R = any
#### Type declaration
* * (job): R | PromiseLike
* #### Parameters
* job: [SandboxedJob](../interfaces/v3.SandboxedJob.html)
#### Returns R | PromiseLike
#### Type declaration
* * (job, callback): void
* #### Parameters
* job: [SandboxedJob](../interfaces/v3.SandboxedJob.html)
* callback: ((error, result) => void)
* * (error, result): void
* #### Parameters
* error: unknown
* result: R
#### Returns void
#### Returns void
#### See
[https://docs.bullmq.io/guide/workers/sandboxed-processors](https://docs.bullmq.io/guide/workers/sandboxed-processors)
### StreamName[](#StreamName)
StreamName: string
### StreamReadRaw[](#StreamReadRaw)
StreamReadRaw: \[[StreamName](v3.html#StreamName)\
, [EntryRaw](v3.html#EntryRaw)\
\[\]\]\[\] | null | undefined
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [BackoffStrategy](#BackoffStrategy)
* [BulkJobOptions](#BulkJobOptions)
* [ClusterOptions](#ClusterOptions)
* [ConnectionOptions](#ConnectionOptions)
* [EntryId](#EntryId)
* [EntryRaw](#EntryRaw)
* [FinishedPropValAttribute](#FinishedPropValAttribute)
* [FinishedStatus](#FinishedStatus)
* [FlowChildJob](#FlowChildJob)
* [FlowJob](#FlowJob)
* [FlowQueuesOpts](#FlowQueuesOpts)
* [JobData](#JobData)
* [JobJsonSandbox](#JobJsonSandbox)
* [JobState](#JobState)
* [JobType](#JobType)
* [JobsOptions](#JobsOptions)
* [KeysMap](#KeysMap)
* [MinimalQueue](#MinimalQueue)
* [ParentOpts](#ParentOpts)
* [Processor](#Processor)
* [RedisClient](#RedisClient)
* [RedisJobOptions](#RedisJobOptions)
* [RedisOptions](#RedisOptions)
* [RepeatStrategy](#RepeatStrategy)
* [SandboxedJobProcessor](#SandboxedJobProcessor)
* [StreamName](#StreamName)
* [StreamReadRaw](#StreamReadRaw)
Generated using [TypeDoc](https://typedoc.org/)
---
# v2 | bullmq - v5.41.8
* [bullmq](../index.html)
* [v2](v2.html)
Module v2
=========
##### Index
### Enumerations
[ChildCommand](../enums/v2.ChildCommand.html)
[ClientType](../enums/v2.ClientType.html)
[ErrorCode](../enums/v2.ErrorCode.html)
[MetricsTime](../enums/v2.MetricsTime.html)
[ParentCommand](../enums/v2.ParentCommand.html)
### Classes
[Backoffs](../classes/v2.Backoffs.html)
[ChildPool](../classes/v2.ChildPool.html)
[ChildProcessor](../classes/v2.ChildProcessor.html)
[FlowProducer](../classes/v2.FlowProducer.html)
[Job](../classes/v2.Job.html)
[Queue](../classes/v2.Queue.html)
[QueueBase](../classes/v2.QueueBase.html)
[QueueEvents](../classes/v2.QueueEvents.html)
[QueueGetters](../classes/v2.QueueGetters.html)
[QueueKeys](../classes/v2.QueueKeys.html)
[RedisConnection](../classes/v2.RedisConnection.html)
[Repeat](../classes/v2.Repeat.html)
[ScriptLoader](../classes/v2.ScriptLoader.html)
[ScriptLoaderError](../classes/v2.ScriptLoaderError.html)
[Scripts](../classes/v2.Scripts.html)
[TimerManager](../classes/v2.TimerManager.html)
[UnrecoverableError](../classes/v2.UnrecoverableError.html)
[Worker](../classes/v2.Worker.html)
### Interfaces
[AddChildrenOpts](../interfaces/v2.AddChildrenOpts.html)
[AddNodeOpts](../interfaces/v2.AddNodeOpts.html)
[AdvancedOptions](../interfaces/v2.AdvancedOptions.html)
[AdvancedRepeatOptions](../interfaces/v2.AdvancedRepeatOptions.html)
[BackoffOptions](../interfaces/v2.BackoffOptions.html)
[BaseJobOptions](../interfaces/v2.BaseJobOptions.html)
[ChildMessage](../interfaces/v2.ChildMessage.html)
[ChildProcessExt](../interfaces/v2.ChildProcessExt.html)
[Command](../interfaces/v2.Command.html)
[DefaultJobOptions](../interfaces/v2.DefaultJobOptions.html)
[DependenciesOpts](../interfaces/v2.DependenciesOpts.html)
[FlowOpts](../interfaces/v2.FlowOpts.html)
[FlowProducerListener](../interfaces/v2.FlowProducerListener.html)
[GetNextJobOptions](../interfaces/v2.GetNextJobOptions.html)
[IConnection](../interfaces/v2.IConnection.html)
[IoredisListener](../interfaces/v2.IoredisListener.html)
[JobJson](../interfaces/v2.JobJson.html)
[JobJsonRaw](../interfaces/v2.JobJsonRaw.html)
[JobNode](../interfaces/v2.JobNode.html)
[KeepJobs](../interfaces/v2.KeepJobs.html)
[Metrics](../interfaces/v2.Metrics.html)
[MetricsOptions](../interfaces/v2.MetricsOptions.html)
[MoveToWaitingChildrenOpts](../interfaces/v2.MoveToWaitingChildrenOpts.html)
[NodeOpts](../interfaces/v2.NodeOpts.html)
[ObliterateOpts](../interfaces/v2.ObliterateOpts.html)
[Parent](../interfaces/v2.Parent.html)
[ParentKeys](../interfaces/v2.ParentKeys.html)
[ParentMessage](../interfaces/v2.ParentMessage.html)
[QueueBaseOptions](../interfaces/v2.QueueBaseOptions.html)
[QueueEventsListener](../interfaces/v2.QueueEventsListener.html)
[QueueEventsOptions](../interfaces/v2.QueueEventsOptions.html)
[QueueListener](../interfaces/v2.QueueListener.html)
[QueueOptions](../interfaces/v2.QueueOptions.html)
[RateLimiterOptions](../interfaces/v2.RateLimiterOptions.html)
[RawCommand](../interfaces/v2.RawCommand.html)
[RepeatBaseOptions](../interfaces/v2.RepeatBaseOptions.html)
[RepeatOptions](../interfaces/v2.RepeatOptions.html)
[SandboxedJob](../interfaces/v2.SandboxedJob.html)
[ScriptMetadata](../interfaces/v2.ScriptMetadata.html)
[Strategies](../interfaces/v2.Strategies.html)
[WorkerListener](../interfaces/v2.WorkerListener.html)
[WorkerOptions](../interfaces/v2.WorkerOptions.html)
### Type Aliases
[BackoffFunction](v2.html#BackoffFunction)
[BulkJobOptions](v2.html#BulkJobOptions)
[ClusterOptions](v2.html#ClusterOptions)
[ConnectionOptions](v2.html#ConnectionOptions)
[EntryId](v2.html#EntryId)
[EntryRaw](v2.html#EntryRaw)
[FinishedPropValAttribute](v2.html#FinishedPropValAttribute)
[FinishedStatus](v2.html#FinishedStatus)
[FlowChildJob](v2.html#FlowChildJob)
[FlowJob](v2.html#FlowJob)
[FlowQueuesOpts](v2.html#FlowQueuesOpts)
[JobData](v2.html#JobData)
[JobJsonSandbox](v2.html#JobJsonSandbox)
[JobState](v2.html#JobState)
[JobType](v2.html#JobType)
[JobsOptions](v2.html#JobsOptions)
[KeysMap](v2.html#KeysMap)
[MinimalQueue](v2.html#MinimalQueue)
[ParentOpts](v2.html#ParentOpts)
[Processor](v2.html#Processor)
[RedisClient](v2.html#RedisClient)
[RedisJobOptions](v2.html#RedisJobOptions)
[RedisOptions](v2.html#RedisOptions)
[RepeatStrategy](v2.html#RepeatStrategy)
[SandboxedJobProcessor](v2.html#SandboxedJobProcessor)
[StreamName](v2.html#StreamName)
[StreamReadRaw](v2.html#StreamReadRaw)
### Variables
[DELAY\_TIME\_1](../variables/v2.DELAY_TIME_1.html)
[DELAY\_TIME\_5](../variables/v2.DELAY_TIME_5.html)
[QUEUE\_EVENT\_SUFFIX](../variables/v2.QUEUE_EVENT_SUFFIX.html)
[QUEUE\_SCHEDULER\_SUFFIX](../variables/v2.QUEUE_SCHEDULER_SUFFIX.html)
[WORKER\_SUFFIX](../variables/v2.WORKER_SUFFIX.html)
[clientCommandMessageReg](../variables/v2.clientCommandMessageReg.html)
[errorObject](../variables/v2.errorObject.html)
[scriptLoader](../variables/v2.scriptLoader-1.html)
### Functions
[array2obj](../functions/v2.array2obj.html)
[asyncSend](../functions/v2.asyncSend.html)
[childSend](../functions/v2.childSend.html)
[delay](../functions/v2.delay.html)
[getNextMillis](../functions/v2.getNextMillis.html)
[getParentKey](../functions/v2.getParentKey.html)
[isEmpty](../functions/v2.isEmpty.html)
[isNotConnectionError](../functions/v2.isNotConnectionError.html)
[isRedisCluster](../functions/v2.isRedisCluster.html)
[isRedisInstance](../functions/v2.isRedisInstance.html)
[isRedisVersionLowerThan](../functions/v2.isRedisVersionLowerThan.html)
[jobIdForGroup](../functions/v2.jobIdForGroup.html)
[killAsync](../functions/v2.killAsync.html)
[lengthInUtf8Bytes](../functions/v2.lengthInUtf8Bytes.html)
[parentSend](../functions/v2.parentSend.html)
[raw2jobData](../functions/v2.raw2jobData.html)
[removeAllQueueData](../functions/v2.removeAllQueueData.html)
[tryCatch](../functions/v2.tryCatch.html)
Type Aliases
------------
### BackoffFunction[](#BackoffFunction)
BackoffFunction: ((attemptsMade?, err?, job?) => number)
#### Type declaration
* * (attemptsMade?, err?, job?): number
* #### Parameters
* `Optional` attemptsMade: number
* `Optional` err: Error
* `Optional` job: [Job](../classes/v2.Job.html)
#### Returns number
### BulkJobOptions[](#BulkJobOptions)
BulkJobOptions: Omit<[JobsOptions](v2.html#JobsOptions)
, "repeat"\>
### ClusterOptions[](#ClusterOptions)
ClusterOptions: IORedis.ClusterOptions & [BaseOptions](../interfaces/v5.BaseOptions.html)
### ConnectionOptions[](#ConnectionOptions)
ConnectionOptions: [RedisOptions](v2.html#RedisOptions)
| [ClusterOptions](v2.html#ClusterOptions)
| IORedis.Redis | IORedis.Cluster
### EntryId[](#EntryId)
EntryId: string
### EntryRaw[](#EntryRaw)
EntryRaw: \[[EntryId](v2.html#EntryId)\
, string\[\]\]
### FinishedPropValAttribute[](#FinishedPropValAttribute)
FinishedPropValAttribute: "returnvalue" | "failedReason"
### FinishedStatus[](#FinishedStatus)
FinishedStatus: "completed" | "failed"
### FlowChildJob[](#FlowChildJob)
FlowChildJob: [FlowJobBase](../interfaces/v5.FlowJobBase.html)
\>
### FlowJob[](#FlowJob)
FlowJob: [FlowJobBase](../interfaces/v5.FlowJobBase.html)
<[JobsOptions](v2.html#JobsOptions)
\>
### FlowQueuesOpts[](#FlowQueuesOpts)
FlowQueuesOpts: Record\>
### JobData[](#JobData)
JobData: \[[JobJsonRaw](../interfaces/v2.JobJsonRaw.html)\
| number, string?\]
### JobJsonSandbox[](#JobJsonSandbox)
JobJsonSandbox: [JobJson](../interfaces/v2.JobJson.html)
& {
prefix: string;
queueName: string;
}
#### Type declaration
* ##### prefix: string
* ##### queueName: string
### JobState[](#JobState)
JobState: [FinishedStatus](v2.html#FinishedStatus)
| "active" | "delayed" | "waiting" | "waiting-children"
### JobType[](#JobType)
JobType: [JobState](v2.html#JobState)
| "paused" | "repeat" | "wait"
### JobsOptions[](#JobsOptions)
JobsOptions: [BaseJobOptions](../interfaces/v2.BaseJobOptions.html)
& {
failParentOnFailure?: boolean;
}
#### Type declaration
* ##### `Optional` failParentOnFailure?: boolean
If true, moves parent to failed.
### KeysMap[](#KeysMap)
KeysMap: {
\[index in string\]: string
}
### MinimalQueue[](#MinimalQueue)
MinimalQueue: Pick<[QueueBase](../classes/v2.QueueBase.html)
, "name" | "client" | "toKey" | "keys" | "opts" | "closing" | "waitUntilReady" | "removeListener" | "emit" | "on" | "redisVersion"\>
### ParentOpts[](#ParentOpts)
ParentOpts: {
parentDependenciesKey?: string;
parentKey?: string;
waitChildrenKey?: string;
}
#### Type declaration
* ##### `Optional` parentDependenciesKey?: string
* ##### `Optional` parentKey?: string
* ##### `Optional` waitChildrenKey?: string
### Processor[](#Processor)
Processor<[T](v2.html#Processor.T)
, [R](v2.html#Processor.R)
, [N](v2.html#Processor.N)
\>: ((job, token?) => Promise)
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Type declaration
* * (job, token?): Promise
* An async function that receives `Job`s and handles them.
#### Parameters
* job: [Job](../classes/v2.Job.html)
* `Optional` token: string
#### Returns Promise
### RedisClient[](#RedisClient)
RedisClient: Redis | Cluster
### RedisJobOptions[](#RedisJobOptions)
RedisJobOptions: [BaseJobOptions](../interfaces/v2.BaseJobOptions.html)
& {
fpof?: boolean;
}
These fields are the ones stored in Redis with smaller keys for compactness.
#### Type declaration
* ##### `Optional` fpof?: boolean
If true, moves parent to failed.
### RedisOptions[](#RedisOptions)
RedisOptions: IORedis.RedisOptions & [BaseOptions](../interfaces/v5.BaseOptions.html)
### RepeatStrategy[](#RepeatStrategy)
RepeatStrategy: ((millis, opts, name?) => number)
#### Type declaration
* * (millis, opts, name?): number
* #### Parameters
* millis: number
* opts: [RepeatOptions](../interfaces/v2.RepeatOptions.html)
* `Optional` name: string
#### Returns number
### SandboxedJobProcessor[](#SandboxedJobProcessor)
SandboxedJobProcessor<[T](v2.html#SandboxedJobProcessor.T-1)
, [R](v2.html#SandboxedJobProcessor.R-1)
\>: ((job) => R | PromiseLike) | ((job, callback) => void)
#### Type Parameters
* T = any
* R = any
#### Type declaration
* * (job): R | PromiseLike
* #### Parameters
* job: [SandboxedJob](../interfaces/v2.SandboxedJob.html)
#### Returns R | PromiseLike
#### Type declaration
* * (job, callback): void
* #### Parameters
* job: [SandboxedJob](../interfaces/v2.SandboxedJob.html)
* callback: ((error, result) => void)
* * (error, result): void
* #### Parameters
* error: unknown
* result: R
#### Returns void
#### Returns void
#### See
[https://docs.bullmq.io/guide/workers/sandboxed-processors](https://docs.bullmq.io/guide/workers/sandboxed-processors)
### StreamName[](#StreamName)
StreamName: string
### StreamReadRaw[](#StreamReadRaw)
StreamReadRaw: \[[StreamName](v2.html#StreamName)\
, [EntryRaw](v2.html#EntryRaw)\
\[\]\]\[\]
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [BackoffFunction](#BackoffFunction)
* [BulkJobOptions](#BulkJobOptions)
* [ClusterOptions](#ClusterOptions)
* [ConnectionOptions](#ConnectionOptions)
* [EntryId](#EntryId)
* [EntryRaw](#EntryRaw)
* [FinishedPropValAttribute](#FinishedPropValAttribute)
* [FinishedStatus](#FinishedStatus)
* [FlowChildJob](#FlowChildJob)
* [FlowJob](#FlowJob)
* [FlowQueuesOpts](#FlowQueuesOpts)
* [JobData](#JobData)
* [JobJsonSandbox](#JobJsonSandbox)
* [JobState](#JobState)
* [JobType](#JobType)
* [JobsOptions](#JobsOptions)
* [KeysMap](#KeysMap)
* [MinimalQueue](#MinimalQueue)
* [ParentOpts](#ParentOpts)
* [Processor](#Processor)
* [RedisClient](#RedisClient)
* [RedisJobOptions](#RedisJobOptions)
* [RedisOptions](#RedisOptions)
* [RepeatStrategy](#RepeatStrategy)
* [SandboxedJobProcessor](#SandboxedJobProcessor)
* [StreamName](#StreamName)
* [StreamReadRaw](#StreamReadRaw)
Generated using [TypeDoc](https://typedoc.org/)
---
# Job | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [Job](v5.Job.html)
Class Job
=========================================
Job
This class represents a Job in the queue. Normally job are implicitly created when you add a job to the queue with methods such as Queue.addJob( ... )
A Job instance is also passed to the Worker's process function.
Job
#### Type Parameters
* DataType = any
* ReturnType = any
* NameType extends string = string
#### Implements
* [MinimalJob](../interfaces/v5.MinimalJob.html)
<[DataType](v5.Job.html#constructor.new_Job.DataType-1)
, [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
, [NameType](v5.Job.html#constructor.new_Job.NameType-1)
\>
##### Index
### Constructors
[constructor](v5.Job.html#constructor)
### Properties
[attemptsMade](v5.Job.html#attemptsMade)
[attemptsStarted](v5.Job.html#attemptsStarted)
[data](v5.Job.html#data)
[debounceId?](v5.Job.html#debounceId)
[deduplicationId?](v5.Job.html#deduplicationId)
[delay](v5.Job.html#delay)
[failedReason](v5.Job.html#failedReason)
[finishedOn?](v5.Job.html#finishedOn)
[id?](v5.Job.html#id)
[name](v5.Job.html#name)
[nextRepeatableJobId?](v5.Job.html#nextRepeatableJobId)
[opts](v5.Job.html#opts)
[parent?](v5.Job.html#parent)
[parentKey?](v5.Job.html#parentKey)
[priority](v5.Job.html#priority)
[processedBy?](v5.Job.html#processedBy)
[processedOn?](v5.Job.html#processedOn)
[progress](v5.Job.html#progress)
[queueQualifiedName](v5.Job.html#queueQualifiedName)
[repeatJobKey?](v5.Job.html#repeatJobKey)
[returnvalue](v5.Job.html#returnvalue)
[stacktrace](v5.Job.html#stacktrace)
[timestamp](v5.Job.html#timestamp)
[token?](v5.Job.html#token)
### Accessors
[prefix](v5.Job.html#prefix)
[queueName](v5.Job.html#queueName)
### Methods
[addJob](v5.Job.html#addJob)
[asJSON](v5.Job.html#asJSON)
[asJSONSandbox](v5.Job.html#asJSONSandbox)
[changeDelay](v5.Job.html#changeDelay)
[changePriority](v5.Job.html#changePriority)
[clearLogs](v5.Job.html#clearLogs)
[discard](v5.Job.html#discard)
[extendLock](v5.Job.html#extendLock)
[getChildrenValues](v5.Job.html#getChildrenValues)
[getDependencies](v5.Job.html#getDependencies)
[getDependenciesCount](v5.Job.html#getDependenciesCount)
[getFailedChildrenValues](v5.Job.html#getFailedChildrenValues)
[getState](v5.Job.html#getState)
[isActive](v5.Job.html#isActive)
[isCompleted](v5.Job.html#isCompleted)
[isDelayed](v5.Job.html#isDelayed)
[isFailed](v5.Job.html#isFailed)
[isWaiting](v5.Job.html#isWaiting)
[isWaitingChildren](v5.Job.html#isWaitingChildren)
[log](v5.Job.html#log)
[moveToCompleted](v5.Job.html#moveToCompleted)
[moveToDelayed](v5.Job.html#moveToDelayed)
[moveToFailed](v5.Job.html#moveToFailed)
[moveToWait](v5.Job.html#moveToWait)
[moveToWaitingChildren](v5.Job.html#moveToWaitingChildren)
[promote](v5.Job.html#promote)
[remove](v5.Job.html#remove)
[removeChildDependency](v5.Job.html#removeChildDependency)
[retry](v5.Job.html#retry)
[toJSON](v5.Job.html#toJSON)
[updateData](v5.Job.html#updateData)
[updateProgress](v5.Job.html#updateProgress)
[waitUntilFinished](v5.Job.html#waitUntilFinished)
[addJobLog](v5.Job.html#addJobLog)
[create](v5.Job.html#create)
[createBulk](v5.Job.html#createBulk)
[fromId](v5.Job.html#fromId)
[fromJSON](v5.Job.html#fromJSON)
[optsAsJSON](v5.Job.html#optsAsJSON)
[optsFromJSON](v5.Job.html#optsFromJSON)
Constructors
------------
### constructor[](#constructor)
* new Job<[DataType](v5.Job.html#constructor.new_Job.DataType-1)
, [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
, [NameType](v5.Job.html#constructor.new_Job.NameType-1)
\>(queue, name, data, opts?, id?): [Job](v5.Job.html)
<[DataType](v5.Job.html#constructor.new_Job.DataType-1)
, [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
, [NameType](v5.Job.html#constructor.new_Job.NameType-1)
\>[](#constructor.new_Job)
* #### Type Parameters
* DataType = any
* ReturnType = any
* NameType extends string = string
#### Parameters
* queue: [MinimalQueue](../types/v5.MinimalQueue.html)
* name: [NameType](v5.Job.html#constructor.new_Job.NameType-1)
The name of the Job
* data: [DataType](v5.Job.html#constructor.new_Job.DataType-1)
The payload for this job.
* opts: [JobsOptions](../types/v5.JobsOptions.html)
= {}
The options object for this job.
* `Optional` id: string
#### Returns [Job](v5.Job.html)
<[DataType](v5.Job.html#constructor.new_Job.DataType-1)
, [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
, [NameType](v5.Job.html#constructor.new_Job.NameType-1)
\>
Properties
----------
### attemptsMade[](#attemptsMade)
attemptsMade: number = 0
Number of attempts after the job has failed.
#### Default Value
0
### attemptsStarted[](#attemptsStarted)
attemptsStarted: number = 0
Number of attempts when job is moved to active.
#### Default Value
0
### data[](#data)
data: [DataType](v5.Job.html#constructor.new_Job.DataType-1)
The payload for this job.
### `Optional` debounceId[](#debounceId)
debounceId?: string
Debounce identifier.
#### Deprecated
use deduplicationId
### `Optional` deduplicationId[](#deduplicationId)
deduplicationId?: string
Deduplication identifier.
### delay[](#delay)
delay: number = 0
An amount of milliseconds to wait until this job can be processed.
#### Default Value
0
### failedReason[](#failedReason)
failedReason: string
Reason for failing.
### `Optional` finishedOn[](#finishedOn)
finishedOn?: number
Timestamp for when the job finished (completed or failed).
### `Optional` id[](#id)
id?: string
### name[](#name)
name: [NameType](v5.Job.html#constructor.new_Job.NameType-1)
The name of the Job
### `Optional` nextRepeatableJobId[](#nextRepeatableJobId)
nextRepeatableJobId?: string
Produced next repetable job Id.
### opts[](#opts)
opts: [JobsOptions](../types/v5.JobsOptions.html)
= {}
The options object for this job.
### `Optional` parent[](#parent)
parent?: [ParentKeys](../interfaces/v5.ParentKeys.html)
Object that contains parentId (id) and parent queueKey.
### `Optional` parentKey[](#parentKey)
parentKey?: string
Fully qualified key (including the queue prefix) pointing to the parent of this job.
### priority[](#priority)
priority: number = 0
Ranges from 0 (highest priority) to 2 097 152 (lowest priority). Note that using priorities has a slight impact on performance, so do not use it if not required.
#### Default Value
0
### `Optional` processedBy[](#processedBy)
processedBy?: string
The worker name that is processing or processed this job.
### `Optional` processedOn[](#processedOn)
processedOn?: number
Timestamp for when the job was processed.
### progress[](#progress)
progress: number | object = 0
The progress a job has performed so far.
#### Default Value
0
### `Readonly` queueQualifiedName[](#queueQualifiedName)
queueQualifiedName: string
It includes the prefix, the namespace separator :, and queue name.
#### See
[https://www.gnu.org/software/gawk/manual/html\_node/Qualified-Names.html](https://www.gnu.org/software/gawk/manual/html_node/Qualified-Names.html)
### `Optional` repeatJobKey[](#repeatJobKey)
repeatJobKey?: string
Base repeat job key.
### returnvalue[](#returnvalue)
returnvalue: [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
= null
The value returned by the processor when processing this job.
#### Default Value
null
### stacktrace[](#stacktrace)
stacktrace: string\[\] = null
Stacktrace for the error (for failed jobs).
#### Default Value
null
### timestamp[](#timestamp)
timestamp: number
Timestamp when the job was created (unless overridden with job options).
### `Optional` token[](#token)
token?: string
The token used for locking this job.
Accessors
---------
### prefix[](#prefix)
* get prefix(): string
* #### Returns string
the prefix that is used.
### queueName[](#queueName)
* get queueName(): string
* #### Returns string
the queue name this job belongs to.
Methods
-------
### addJob[](#addJob)
* addJob(client, parentOpts?): Promise[](#addJob.addJob-1)
* Adds the job to Redis.
#### Parameters
* client: [RedisClient](../types/v5.RedisClient.html)
* `Optional` parentOpts: [ParentOpts](../types/v5.ParentOpts.html)
#### Returns Promise
### asJSON[](#asJSON)
* asJSON(): [JobJson](../interfaces/v5.JobJson.html)
[](#asJSON.asJSON-1)
* Prepares a job to be serialized for storage in Redis.
#### Returns [JobJson](../interfaces/v5.JobJson.html)
### asJSONSandbox[](#asJSONSandbox)
* asJSONSandbox(): [JobJsonSandbox](../types/v5.JobJsonSandbox.html)
[](#asJSONSandbox.asJSONSandbox-1)
* Prepares a job to be passed to Sandbox.
#### Returns [JobJsonSandbox](../types/v5.JobJsonSandbox.html)
### changeDelay[](#changeDelay)
* changeDelay(delay): Promise[](#changeDelay.changeDelay-1)
* Change delay of a delayed job.
#### Parameters
* delay: number
milliseconds to be added to current time.
#### Returns Promise
void
### changePriority[](#changePriority)
* changePriority(opts): Promise[](#changePriority.changePriority-1)
* Change job priority.
#### Parameters
* opts: {
lifo?: boolean;
priority?: number;
}
options containing priority and lifo values.
* ##### `Optional` lifo?: boolean
* ##### `Optional` priority?: number
#### Returns Promise
void
### clearLogs[](#clearLogs)
* clearLogs(keepLogs?): Promise[](#clearLogs.clearLogs-1)
* Clears job's logs
#### Parameters
* `Optional` keepLogs: number
the amount of log entries to preserve
#### Returns Promise
### discard[](#discard)
* discard(): void[](#discard.discard-1)
* Marks a job to not be retried if it fails (even if attempts has been configured)
#### Returns void
#### Deprecated
use UnrecoverableError
### extendLock[](#extendLock)
* extendLock(token, duration): Promise[](#extendLock.extendLock-1)
* Extend the lock for this job.
#### Parameters
* token: string
unique token for the lock
* duration: number
lock duration in milliseconds
#### Returns Promise
### getChildrenValues[](#getChildrenValues)
* getChildrenValues<[CT](v5.Job.html#getChildrenValues.getChildrenValues-1.CT)
\>(): Promise<{
\[jobKey: string\]: [CT](v5.Job.html#getChildrenValues.getChildrenValues-1.CT)
;
}\>[](#getChildrenValues.getChildrenValues-1)
* Get this jobs children result values if any.
#### Type Parameters
* CT = any
#### Returns Promise<{
\[jobKey: string\]: [CT](v5.Job.html#getChildrenValues.getChildrenValues-1.CT)
;
}\>
Object mapping children job keys with their values.
### getDependencies[](#getDependencies)
* getDependencies(opts?): Promise<{
nextProcessedCursor?: number;
nextUnprocessedCursor?: number;
processed?: Record;
unprocessed?: string\[\];
}\>[](#getDependencies.getDependencies-1)
* Get children job keys if this job is a parent and has children.
#### Parameters
* opts: [DependenciesOpts](../interfaces/v5.DependenciesOpts.html)
= {}
#### Returns Promise<{
nextProcessedCursor?: number;
nextUnprocessedCursor?: number;
processed?: Record;
unprocessed?: string\[\];
}\>
dependencies separated by processed and unprocessed.
#### Remarks
Count options before Redis v7.2 works as expected with any quantity of entries on processed/unprocessed dependencies, since v7.2 you must consider that count won't have any effect until processed/unprocessed dependencies have a length greater than 127
#### See
[https://redis.io/docs/management/optimization/memory-optimization/#redis--72](https://redis.io/docs/management/optimization/memory-optimization/#redis--72)
### getDependenciesCount[](#getDependenciesCount)
* getDependenciesCount(opts?): Promise<{
processed?: number;
unprocessed?: number;
}\>[](#getDependenciesCount.getDependenciesCount-1)
* Get children job counts if this job is a parent and has children.
#### Parameters
* opts: {
processed?: boolean;
unprocessed?: boolean;
} = {}
* ##### `Optional` processed?: boolean
* ##### `Optional` unprocessed?: boolean
#### Returns Promise<{
processed?: number;
unprocessed?: number;
}\>
dependencies count separated by processed and unprocessed.
### getFailedChildrenValues[](#getFailedChildrenValues)
* getFailedChildrenValues(): Promise<{
\[jobKey: string\]: string;
}\>[](#getFailedChildrenValues.getFailedChildrenValues-1)
* Get this jobs children failure values if any.
#### Returns Promise<{
\[jobKey: string\]: string;
}\>
Object mapping children job keys with their failure values.
### getState[](#getState)
* getState(): Promise<"unknown" | [JobState](../types/v5.JobState.html)
\>[](#getState.getState-1)
* Get current state.
#### Returns Promise<"unknown" | [JobState](../types/v5.JobState.html)
\>
Returns one of these values: 'completed', 'failed', 'delayed', 'active', 'waiting', 'waiting-children', 'unknown'.
### isActive[](#isActive)
* isActive(): Promise[](#isActive.isActive-1)
* #### Returns Promise
true of the job is active.
### isCompleted[](#isCompleted)
* isCompleted(): Promise[](#isCompleted.isCompleted-1)
* #### Returns Promise
true if the job has completed.
### isDelayed[](#isDelayed)
* isDelayed(): Promise[](#isDelayed.isDelayed-1)
* #### Returns Promise
true if the job is delayed.
### isFailed[](#isFailed)
* isFailed(): Promise[](#isFailed.isFailed-1)
* #### Returns Promise
true if the job has failed.
### isWaiting[](#isWaiting)
* isWaiting(): Promise[](#isWaiting.isWaiting-1)
* #### Returns Promise
true if the job is waiting.
### isWaitingChildren[](#isWaitingChildren)
* isWaitingChildren(): Promise[](#isWaitingChildren.isWaitingChildren-1)
* #### Returns Promise
true if the job is waiting for children.
### log[](#log)
* log(logRow): Promise[](#log.log-1)
* Logs one row of log data.
#### Parameters
* logRow: string
string with log data to be logged.
#### Returns Promise
The total number of log entries for this job so far.
### moveToCompleted[](#moveToCompleted)
* moveToCompleted(returnValue, token, fetchNext?): Promise[](#moveToCompleted.moveToCompleted-1)
* Moves a job to the completed queue. Returned job to be used with Queue.prototype.nextJobFromJobData.
#### Parameters
* returnValue: [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
The jobs success message.
* token: string
Worker token used to acquire completed job.
* fetchNext: boolean = true
True when wanting to fetch the next job.
#### Returns Promise
Returns the jobData of the next job in the waiting queue or void.
### moveToDelayed[](#moveToDelayed)
* moveToDelayed(timestamp, token?): Promise[](#moveToDelayed.moveToDelayed-1)
* Moves the job to the delay set.
#### Parameters
* timestamp: number
timestamp when the job should be moved back to "wait"
* `Optional` token: string
token to check job is locked by current worker
#### Returns Promise
### moveToFailed[](#moveToFailed)
* moveToFailed<[E](v5.Job.html#moveToFailed.moveToFailed-1.E)
\>(err, token, fetchNext?): Promise[](#moveToFailed.moveToFailed-1)
* Moves a job to the failed queue.
#### Type Parameters
* E extends Error
#### Parameters
* err: [E](v5.Job.html#moveToFailed.moveToFailed-1.E)
the jobs error message.
* token: string
token to check job is locked by current worker
* fetchNext: boolean = false
true when wanting to fetch the next job
#### Returns Promise
Returns the jobData of the next job in the waiting queue or void.
### moveToWait[](#moveToWait)
* moveToWait(token): Promise[](#moveToWait.moveToWait-1)
* Moves a job to the wait or prioritized state.
#### Parameters
* token: string
Worker token used to acquire completed job.
#### Returns Promise
Returns pttl.
### moveToWaitingChildren[](#moveToWaitingChildren)
* moveToWaitingChildren(token, opts?): Promise[](#moveToWaitingChildren.moveToWaitingChildren-1)
* Moves the job to the waiting-children set.
#### Parameters
* token: string
Token to check job is locked by current worker
* opts: [MoveToWaitingChildrenOpts](../interfaces/v5.MoveToWaitingChildrenOpts.html)
= {}
The options bag for moving a job to waiting-children.
#### Returns Promise
true if the job was moved
### promote[](#promote)
* promote(): Promise[](#promote.promote-1)
* Promotes a delayed job so that it starts to be processed as soon as possible.
#### Returns Promise
### remove[](#remove)
* remove(opts?): Promise[](#remove.remove-1)
* Completely remove the job from the queue. Note, this call will throw an exception if the job is being processed when the call is performed.
#### Parameters
* opts: {
removeChildren: boolean;
} = {}
Options to remove a job
* ##### removeChildren: boolean
#### Returns Promise
### removeChildDependency[](#removeChildDependency)
* removeChildDependency(): Promise[](#removeChildDependency.removeChildDependency-1)
* Removes child dependency from parent when child is not yet finished
#### Returns Promise
True if the relationship existed and if it was removed.
### retry[](#retry)
* retry(state?): Promise[](#retry.retry-1)
* Attempts to retry the job. Only a job that has failed or completed can be retried.
#### Parameters
* state: [FinishedStatus](../types/v5.FinishedStatus.html)
= 'failed'
completed / failed
#### Returns Promise
If resolved and return code is 1, then the queue emits a waiting event otherwise the operation was not a success and throw the corresponding error. If the promise rejects, it indicates that the script failed to execute
### toJSON[](#toJSON)
* toJSON(): Omit<[Job](v5.Job.html)
<[DataType](v5.Job.html#constructor.new_Job.DataType-1)
, [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
, [NameType](v5.Job.html#constructor.new_Job.NameType-1)
\>, "remove" | "prefix" | "toJSON" | "scripts" | "changeDelay" | "changePriority" | "extendLock" | "getState" | "moveToDelayed" | "moveToWaitingChildren" | "promote" | "removeChildDependency" | "updateData" | "updateProgress" | "discard" | "addJob" | "queue" | "asJSON" | "asJSONSandbox" | "log" | "clearLogs" | "moveToCompleted" | "moveToWait" | "moveToFailed" | "isCompleted" | "isFailed" | "isDelayed" | "isWaitingChildren" | "isActive" | "isWaiting" | "queueName" | "getChildrenValues" | "getFailedChildrenValues" | "getDependencies" | "getDependenciesCount" | "waitUntilFinished" | "retry"\>[](#toJSON.toJSON-1)
* #### Returns Omit<[Job](v5.Job.html)
<[DataType](v5.Job.html#constructor.new_Job.DataType-1)
, [ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
, [NameType](v5.Job.html#constructor.new_Job.NameType-1)
\>, "remove" | "prefix" | "toJSON" | "scripts" | "changeDelay" | "changePriority" | "extendLock" | "getState" | "moveToDelayed" | "moveToWaitingChildren" | "promote" | "removeChildDependency" | "updateData" | "updateProgress" | "discard" | "addJob" | "queue" | "asJSON" | "asJSONSandbox" | "log" | "clearLogs" | "moveToCompleted" | "moveToWait" | "moveToFailed" | "isCompleted" | "isFailed" | "isDelayed" | "isWaitingChildren" | "isActive" | "isWaiting" | "queueName" | "getChildrenValues" | "getFailedChildrenValues" | "getDependencies" | "getDependenciesCount" | "waitUntilFinished" | "retry"\>
### updateData[](#updateData)
* updateData(data): Promise[](#updateData.updateData-1)
* Updates a job's data
#### Parameters
* data: [DataType](v5.Job.html#constructor.new_Job.DataType-1)
the data that will replace the current jobs data.
#### Returns Promise
### updateProgress[](#updateProgress)
* updateProgress(progress): Promise[](#updateProgress.updateProgress-1)
* Updates a job's progress
#### Parameters
* progress: number | object
number or object to be saved as progress.
#### Returns Promise
### waitUntilFinished[](#waitUntilFinished)
* waitUntilFinished(queueEvents, ttl?): Promise<[ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
\>[](#waitUntilFinished.waitUntilFinished-1)
* Returns a promise the resolves when the job has completed (containing the return value of the job), or rejects when the job has failed (containing the failedReason).
#### Parameters
* queueEvents: [QueueEvents](v5.QueueEvents.html)
Instance of QueueEvents.
* `Optional` ttl: number
Time in milliseconds to wait for job to finish before timing out.
#### Returns Promise<[ReturnType](v5.Job.html#constructor.new_Job.ReturnType-1)
\>
### `Static` addJobLog[](#addJobLog)
* addJobLog(queue, jobId, logRow, keepLogs?): Promise[](#addJobLog.addJobLog-1)
* addJobLog
#### Parameters
* queue: [MinimalQueue](../types/v5.MinimalQueue.html)
Queue instance
* jobId: string
Job id
* logRow: string
Log row
* `Optional` keepLogs: number
optional maximum number of logs to keep
#### Returns Promise
The total number of log entries for this job so far.
### `Static` create[](#create)
* create<[T](v5.Job.html#create.create-1.T)
, [R](v5.Job.html#create.create-1.R)
, [N](v5.Job.html#create.create-1.N)
\>(queue, name, data, opts?): Promise<[Job](v5.Job.html)
<[T](v5.Job.html#create.create-1.T)
, [R](v5.Job.html#create.create-1.R)
, [N](v5.Job.html#create.create-1.N)
\>\>[](#create.create-1)
* Creates a new job and adds it to the queue.
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Parameters
* queue: [MinimalQueue](../types/v5.MinimalQueue.html)
the queue where to add the job.
* name: [N](v5.Job.html#create.create-1.N)
the name of the job.
* data: [T](v5.Job.html#create.create-1.T)
the payload of the job.
* `Optional` opts: [JobsOptions](../types/v5.JobsOptions.html)
the options bag for this job.
#### Returns Promise<[Job](v5.Job.html)
<[T](v5.Job.html#create.create-1.T)
, [R](v5.Job.html#create.create-1.R)
, [N](v5.Job.html#create.create-1.N)
\>\>
### `Static` createBulk[](#createBulk)
* createBulk<[T](v5.Job.html#createBulk.createBulk-1.T-1)
, [R](v5.Job.html#createBulk.createBulk-1.R-1)
, [N](v5.Job.html#createBulk.createBulk-1.N-1)
\>(queue, jobs): Promise<[Job](v5.Job.html)
<[T](v5.Job.html#createBulk.createBulk-1.T-1)
, [R](v5.Job.html#createBulk.createBulk-1.R-1)
, [N](v5.Job.html#createBulk.createBulk-1.N-1)
\>\[\]\>[](#createBulk.createBulk-1)
* Creates a bulk of jobs and adds them atomically to the given queue.
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Parameters
* queue: [MinimalQueue](../types/v5.MinimalQueue.html)
the queue were to add the jobs.
* jobs: {
data: [T](v5.Job.html#createBulk.createBulk-1.T-1)
;
name: [N](v5.Job.html#createBulk.createBulk-1.N-1)
;
opts?: [BulkJobOptions](../types/v5.BulkJobOptions.html)
;
}\[\]
an array of jobs to be added to the queue.
#### Returns Promise<[Job](v5.Job.html)
<[T](v5.Job.html#createBulk.createBulk-1.T-1)
, [R](v5.Job.html#createBulk.createBulk-1.R-1)
, [N](v5.Job.html#createBulk.createBulk-1.N-1)
\>\[\]\>
### `Static` fromId[](#fromId)
* fromId<[T](v5.Job.html#fromId.fromId-1.T-2)
, [R](v5.Job.html#fromId.fromId-1.R-2)
, [N](v5.Job.html#fromId.fromId-1.N-2)
\>(queue, jobId): Promise<[Job](v5.Job.html)
<[T](v5.Job.html#fromId.fromId-1.T-2)
, [R](v5.Job.html#fromId.fromId-1.R-2)
, [N](v5.Job.html#fromId.fromId-1.N-2)
\>\>[](#fromId.fromId-1)
* Fetches a Job from the queue given the passed job id.
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Parameters
* queue: [MinimalQueue](../types/v5.MinimalQueue.html)
the queue where the job belongs to.
* jobId: string
the job id.
#### Returns Promise<[Job](v5.Job.html)
<[T](v5.Job.html#fromId.fromId-1.T-2)
, [R](v5.Job.html#fromId.fromId-1.R-2)
, [N](v5.Job.html#fromId.fromId-1.N-2)
\>\>
### `Static` fromJSON[](#fromJSON)
* fromJSON<[T](v5.Job.html#fromJSON.fromJSON-1.T-3)
, [R](v5.Job.html#fromJSON.fromJSON-1.R-3)
, [N](v5.Job.html#fromJSON.fromJSON-1.N-3)
\>(queue, json, jobId?): [Job](v5.Job.html)
<[T](v5.Job.html#fromJSON.fromJSON-1.T-3)
, [R](v5.Job.html#fromJSON.fromJSON-1.R-3)
, [N](v5.Job.html#fromJSON.fromJSON-1.N-3)
\>[](#fromJSON.fromJSON-1)
* Instantiates a Job from a JobJsonRaw object (coming from a deserialized JSON object)
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Parameters
* queue: [MinimalQueue](../types/v5.MinimalQueue.html)
the queue where the job belongs to.
* json: [JobJsonRaw](../interfaces/v5.JobJsonRaw.html)
the plain object containing the job.
* `Optional` jobId: string
an optional job id (overrides the id coming from the JSON object)
#### Returns [Job](v5.Job.html)
<[T](v5.Job.html#fromJSON.fromJSON-1.T-3)
, [R](v5.Job.html#fromJSON.fromJSON-1.R-3)
, [N](v5.Job.html#fromJSON.fromJSON-1.N-3)
\>
### `Static` optsAsJSON[](#optsAsJSON)
* optsAsJSON(opts?): [RedisJobOptions](../types/v5.RedisJobOptions.html)
[](#optsAsJSON.optsAsJSON-1)
* #### Parameters
* opts: [JobsOptions](../types/v5.JobsOptions.html)
= {}
#### Returns [RedisJobOptions](../types/v5.RedisJobOptions.html)
### `Static` optsFromJSON[](#optsFromJSON)
* optsFromJSON(rawOpts?): [JobsOptions](../types/v5.JobsOptions.html)
[](#optsFromJSON.optsFromJSON-1)
* #### Parameters
* `Optional` rawOpts: string
#### Returns [JobsOptions](../types/v5.JobsOptions.html)
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [attemptsMade](#attemptsMade)
* [attemptsStarted](#attemptsStarted)
* [data](#data)
* [debounceId](#debounceId)
* [deduplicationId](#deduplicationId)
* [delay](#delay)
* [failedReason](#failedReason)
* [finishedOn](#finishedOn)
* [id](#id)
* [name](#name)
* [nextRepeatableJobId](#nextRepeatableJobId)
* [opts](#opts)
* [parent](#parent)
* [parentKey](#parentKey)
* [priority](#priority)
* [processedBy](#processedBy)
* [processedOn](#processedOn)
* [progress](#progress)
* [queueQualifiedName](#queueQualifiedName)
* [repeatJobKey](#repeatJobKey)
* [returnvalue](#returnvalue)
* [stacktrace](#stacktrace)
* [timestamp](#timestamp)
* [token](#token)
* [prefix](#prefix)
* [queueName](#queueName)
* [addJob](#addJob)
* [asJSON](#asJSON)
* [asJSONSandbox](#asJSONSandbox)
* [changeDelay](#changeDelay)
* [changePriority](#changePriority)
* [clearLogs](#clearLogs)
* [discard](#discard)
* [extendLock](#extendLock)
* [getChildrenValues](#getChildrenValues)
* [getDependencies](#getDependencies)
* [getDependenciesCount](#getDependenciesCount)
* [getFailedChildrenValues](#getFailedChildrenValues)
* [getState](#getState)
* [isActive](#isActive)
* [isCompleted](#isCompleted)
* [isDelayed](#isDelayed)
* [isFailed](#isFailed)
* [isWaiting](#isWaiting)
* [isWaitingChildren](#isWaitingChildren)
* [log](#log)
* [moveToCompleted](#moveToCompleted)
* [moveToDelayed](#moveToDelayed)
* [moveToFailed](#moveToFailed)
* [moveToWait](#moveToWait)
* [moveToWaitingChildren](#moveToWaitingChildren)
* [promote](#promote)
* [remove](#remove)
* [removeChildDependency](#removeChildDependency)
* [retry](#retry)
* [toJSON](#toJSON)
* [updateData](#updateData)
* [updateProgress](#updateProgress)
* [waitUntilFinished](#waitUntilFinished)
* [addJobLog](#addJobLog)
* [create](#create)
* [createBulk](#createBulk)
* [fromId](#fromId)
* [fromJSON](#fromJSON)
* [optsAsJSON](#optsAsJSON)
* [optsFromJSON](#optsFromJSON)
Generated using [TypeDoc](https://typedoc.org/)
---
# v1 | bullmq - v5.41.8
* [bullmq](../index.html)
* [v1](v1.html)
Module v1
=========
##### Index
### Enumerations
[ChildCommand](../enums/v1.ChildCommand.html)
[ClientType](../enums/v1.ClientType.html)
[ErrorCode](../enums/v1.ErrorCode.html)
[MetricsTime](../enums/v1.MetricsTime.html)
[ParentCommand](../enums/v1.ParentCommand.html)
### Classes
[Backoffs](../classes/v1.Backoffs.html)
[ChildPool](../classes/v1.ChildPool.html)
[ChildProcessor](../classes/v1.ChildProcessor.html)
[FlowProducer](../classes/v1.FlowProducer.html)
[Job](../classes/v1.Job.html)
[Queue](../classes/v1.Queue.html)
[Queue3](../classes/v1.Queue3.html)
[QueueBase](../classes/v1.QueueBase.html)
[QueueEvents](../classes/v1.QueueEvents.html)
[QueueGetters](../classes/v1.QueueGetters.html)
[QueueKeys](../classes/v1.QueueKeys.html)
[QueueScheduler](../classes/v1.QueueScheduler.html)
[RedisConnection](../classes/v1.RedisConnection.html)
[Repeat](../classes/v1.Repeat.html)
[ScriptLoader](../classes/v1.ScriptLoader.html)
[ScriptLoaderError](../classes/v1.ScriptLoaderError.html)
[Scripts](../classes/v1.Scripts.html)
[TimerManager](../classes/v1.TimerManager.html)
[UnrecoverableError](../classes/v1.UnrecoverableError.html)
[Worker](../classes/v1.Worker.html)
### Interfaces
[AddChildrenOpts](../interfaces/v1.AddChildrenOpts.html)
[AddNodeOpts](../interfaces/v1.AddNodeOpts.html)
[AdvancedOptions](../interfaces/v1.AdvancedOptions.html)
[AdvancedRepeatOptions](../interfaces/v1.AdvancedRepeatOptions.html)
[BackoffOptions](../interfaces/v1.BackoffOptions.html)
[BaseJobOptions](../interfaces/v1.BaseJobOptions.html)
[ChildMessage](../interfaces/v1.ChildMessage.html)
[ChildProcessExt](../interfaces/v1.ChildProcessExt.html)
[Command](../interfaces/v1.Command.html)
[DependenciesOpts](../interfaces/v1.DependenciesOpts.html)
[FlowJob](../interfaces/v1.FlowJob.html)
[FlowOpts](../interfaces/v1.FlowOpts.html)
[FlowProducerListener](../interfaces/v1.FlowProducerListener.html)
[GetNextJobOptions](../interfaces/v1.GetNextJobOptions.html)
[IConnection](../interfaces/v1.IConnection.html)
[IoredisListener](../interfaces/v1.IoredisListener.html)
[JobInformation3](../interfaces/v1.JobInformation3.html)
[JobJson](../interfaces/v1.JobJson.html)
[JobJsonRaw](../interfaces/v1.JobJsonRaw.html)
[JobNode](../interfaces/v1.JobNode.html)
[JobPromise3](../interfaces/v1.JobPromise3.html)
[JobsOptions](../interfaces/v1.JobsOptions.html)
[KeepJobs](../interfaces/v1.KeepJobs.html)
[Metrics](../interfaces/v1.Metrics.html)
[MetricsOptions](../interfaces/v1.MetricsOptions.html)
[MoveToWaitingChildrenOpts](../interfaces/v1.MoveToWaitingChildrenOpts.html)
[NodeOpts](../interfaces/v1.NodeOpts.html)
[ObliterateOpts](../interfaces/v1.ObliterateOpts.html)
[Parent](../interfaces/v1.Parent.html)
[ParentKeys](../interfaces/v1.ParentKeys.html)
[ParentMessage](../interfaces/v1.ParentMessage.html)
[QueueBaseOptions](../interfaces/v1.QueueBaseOptions.html)
[QueueEventsListener](../interfaces/v1.QueueEventsListener.html)
[QueueEventsOptions](../interfaces/v1.QueueEventsOptions.html)
[QueueListener](../interfaces/v1.QueueListener.html)
[QueueOptions](../interfaces/v1.QueueOptions.html)
[QueueSchedulerListener](../interfaces/v1.QueueSchedulerListener.html)
[QueueSchedulerOptions](../interfaces/v1.QueueSchedulerOptions.html)
[RateLimiterOptions](../interfaces/v1.RateLimiterOptions.html)
[RepeatBaseOptions](../interfaces/v1.RepeatBaseOptions.html)
[RepeatOptions](../interfaces/v1.RepeatOptions.html)
[SandboxedJob](../interfaces/v1.SandboxedJob.html)
[ScriptMetadata](../interfaces/v1.ScriptMetadata.html)
[Strategies](../interfaces/v1.Strategies.html)
[WorkerListener](../interfaces/v1.WorkerListener.html)
[WorkerOptions](../interfaces/v1.WorkerOptions.html)
### Type Aliases
[ActiveEventCallback3](v1.html#ActiveEventCallback3)
[BackoffFunction](v1.html#BackoffFunction)
[BulkJobOptions](v1.html#BulkJobOptions)
[CleanedEventCallback3](v1.html#CleanedEventCallback3)
[ClusterOptions](v1.html#ClusterOptions)
[CompletedEventCallback3](v1.html#CompletedEventCallback3)
[ConnectionOptions](v1.html#ConnectionOptions)
[EntryId](v1.html#EntryId)
[EntryRaw](v1.html#EntryRaw)
[ErrorEventCallback3](v1.html#ErrorEventCallback3)
[EventCallback3](v1.html#EventCallback3)
[FailedEventCallback3](v1.html#FailedEventCallback3)
[FinishedPropValAttribute](v1.html#FinishedPropValAttribute)
[FinishedStatus](v1.html#FinishedStatus)
[FlowQueuesOpts](v1.html#FlowQueuesOpts)
[JobData](v1.html#JobData)
[JobJsonSandbox](v1.html#JobJsonSandbox)
[JobState](v1.html#JobState)
[JobStatusClean3](v1.html#JobStatusClean3)
[JobType](v1.html#JobType)
[KeysMap](v1.html#KeysMap)
[MinimalQueue](v1.html#MinimalQueue)
[ParentOpts](v1.html#ParentOpts)
[Processor](v1.html#Processor)
[ProgressEventCallback3](v1.html#ProgressEventCallback3)
[RedisClient](v1.html#RedisClient)
[RedisOptions](v1.html#RedisOptions)
[RemovedEventCallback3](v1.html#RemovedEventCallback3)
[RepeatStrategy](v1.html#RepeatStrategy)
[SandboxedJobProcessor](v1.html#SandboxedJobProcessor)
[StalledEventCallback3](v1.html#StalledEventCallback3)
[StreamName](v1.html#StreamName)
[StreamReadRaw](v1.html#StreamReadRaw)
[WaitingEventCallback3](v1.html#WaitingEventCallback3)
### Variables
[DELAY\_TIME\_1](../variables/v1.DELAY_TIME_1.html)
[DELAY\_TIME\_5](../variables/v1.DELAY_TIME_5.html)
[QUEUE\_EVENT\_SUFFIX](../variables/v1.QUEUE_EVENT_SUFFIX.html)
[QUEUE\_SCHEDULER\_SUFFIX](../variables/v1.QUEUE_SCHEDULER_SUFFIX.html)
[WORKER\_SUFFIX](../variables/v1.WORKER_SUFFIX.html)
[clientCommandMessageReg](../variables/v1.clientCommandMessageReg.html)
[errorObject](../variables/v1.errorObject.html)
[scriptLoader](../variables/v1.scriptLoader-1.html)
### Functions
[array2obj](../functions/v1.array2obj.html)
[asyncSend](../functions/v1.asyncSend.html)
[childSend](../functions/v1.childSend.html)
[delay](../functions/v1.delay.html)
[getNextMillis](../functions/v1.getNextMillis.html)
[getParentKey](../functions/v1.getParentKey.html)
[isEmpty](../functions/v1.isEmpty.html)
[isNotConnectionError](../functions/v1.isNotConnectionError.html)
[isRedisCluster](../functions/v1.isRedisCluster.html)
[isRedisInstance](../functions/v1.isRedisInstance.html)
[isRedisVersionLowerThan](../functions/v1.isRedisVersionLowerThan.html)
[jobIdForGroup](../functions/v1.jobIdForGroup.html)
[killAsync](../functions/v1.killAsync.html)
[lengthInUtf8Bytes](../functions/v1.lengthInUtf8Bytes.html)
[parentSend](../functions/v1.parentSend.html)
[raw2jobData](../functions/v1.raw2jobData.html)
[removeAllQueueData](../functions/v1.removeAllQueueData.html)
[tryCatch](../functions/v1.tryCatch.html)
Type Aliases
------------
### ActiveEventCallback3[](#ActiveEventCallback3)
ActiveEventCallback3<[T](v1.html#ActiveEventCallback3.T)
\>: ((job, jobPromise?) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (job, jobPromise?): void
* #### Parameters
* job: [Job](../classes/v1.Job.html)
* `Optional` jobPromise: [JobPromise3](../interfaces/v1.JobPromise3.html)
#### Returns void
### BackoffFunction[](#BackoffFunction)
BackoffFunction: ((attemptsMade?, err?, job?) => number)
#### Type declaration
* * (attemptsMade?, err?, job?): number
* #### Parameters
* `Optional` attemptsMade: number
* `Optional` err: Error
* `Optional` job: [Job](../classes/v1.Job.html)
#### Returns number
### BulkJobOptions[](#BulkJobOptions)
BulkJobOptions: Omit<[JobsOptions](../interfaces/v1.JobsOptions.html)
, "repeat"\>
### CleanedEventCallback3[](#CleanedEventCallback3)
CleanedEventCallback3<[T](v1.html#CleanedEventCallback3.T-1)
\>: ((jobs, status) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (jobs, status): void
* #### Parameters
* jobs: [Job](../classes/v1.Job.html)
\[\]
* status: [JobStatusClean3](v1.html#JobStatusClean3)
#### Returns void
### ClusterOptions[](#ClusterOptions)
ClusterOptions: IORedis.ClusterOptions & [BaseOptions](../interfaces/v5.BaseOptions.html)
### CompletedEventCallback3[](#CompletedEventCallback3)
CompletedEventCallback3<[T](v1.html#CompletedEventCallback3.T-2)
\>: ((job, result) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (job, result): void
* #### Parameters
* job: [Job](../classes/v1.Job.html)
* result: any
#### Returns void
### ConnectionOptions[](#ConnectionOptions)
ConnectionOptions: [RedisOptions](v1.html#RedisOptions)
| [ClusterOptions](v1.html#ClusterOptions)
| IORedis.Redis | IORedis.Cluster
### EntryId[](#EntryId)
EntryId: string
### EntryRaw[](#EntryRaw)
EntryRaw: \[[EntryId](v1.html#EntryId)\
, string\[\]\]
### ErrorEventCallback3[](#ErrorEventCallback3)
ErrorEventCallback3: ((error) => void)
#### Type declaration
* * (error): void
* #### Parameters
* error: Error
#### Returns void
### EventCallback3[](#EventCallback3)
EventCallback3: (() => void)
#### Type declaration
* * (): void
* #### Returns void
### FailedEventCallback3[](#FailedEventCallback3)
FailedEventCallback3<[T](v1.html#FailedEventCallback3.T-3)
\>: ((job, error) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (job, error): void
* #### Parameters
* job: [Job](../classes/v1.Job.html)
* error: Error
#### Returns void
### FinishedPropValAttribute[](#FinishedPropValAttribute)
FinishedPropValAttribute: "returnvalue" | "failedReason"
### FinishedStatus[](#FinishedStatus)
FinishedStatus: "completed" | "failed"
### FlowQueuesOpts[](#FlowQueuesOpts)
FlowQueuesOpts: Record\>
### JobData[](#JobData)
JobData: \[[JobJsonRaw](../interfaces/v1.JobJsonRaw.html)\
| number, string?\]
### JobJsonSandbox[](#JobJsonSandbox)
JobJsonSandbox: [JobJson](../interfaces/v1.JobJson.html)
& {
prefix: string;
queueName: string;
}
#### Type declaration
* ##### prefix: string
* ##### queueName: string
### JobState[](#JobState)
JobState: [FinishedStatus](v1.html#FinishedStatus)
| "active" | "delayed" | "waiting" | "waiting-children"
### JobStatusClean3[](#JobStatusClean3)
JobStatusClean3: "completed" | "wait" | "active" | "delayed" | "paused" | "failed"
### JobType[](#JobType)
JobType: [JobState](v1.html#JobState)
| "paused" | "repeat" | "wait"
### KeysMap[](#KeysMap)
KeysMap: {
\[index in string\]: string
}
### MinimalQueue[](#MinimalQueue)
MinimalQueue: Pick<[QueueBase](../classes/v1.QueueBase.html)
, "name" | "client" | "toKey" | "keys" | "opts" | "closing" | "waitUntilReady" | "removeListener" | "emit" | "on" | "redisVersion"\>
### ParentOpts[](#ParentOpts)
ParentOpts: {
parentDependenciesKey?: string;
parentKey?: string;
waitChildrenKey?: string;
}
#### Type declaration
* ##### `Optional` parentDependenciesKey?: string
* ##### `Optional` parentKey?: string
* ##### `Optional` waitChildrenKey?: string
### Processor[](#Processor)
Processor<[T](v1.html#Processor.T-4)
, [R](v1.html#Processor.R)
, [N](v1.html#Processor.N)
\>: ((job, token?) => Promise)
#### Type Parameters
* T = any
* R = any
* N extends string = string
#### Type declaration
* * (job, token?): Promise
* An async function that receives `Job`s and handles them.
#### Parameters
* job: [Job](../classes/v1.Job.html)
* `Optional` token: string
#### Returns Promise
### ProgressEventCallback3[](#ProgressEventCallback3)
ProgressEventCallback3<[T](v1.html#ProgressEventCallback3.T-5)
\>: ((job, progress) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (job, progress): void
* #### Parameters
* job: [Job](../classes/v1.Job.html)
* progress: any
#### Returns void
### RedisClient[](#RedisClient)
RedisClient: Redis | Cluster
### RedisOptions[](#RedisOptions)
RedisOptions: IORedis.RedisOptions & [BaseOptions](../interfaces/v5.BaseOptions.html)
### RemovedEventCallback3[](#RemovedEventCallback3)
RemovedEventCallback3<[T](v1.html#RemovedEventCallback3.T-6)
\>: ((job) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (job): void
* #### Parameters
* job: [Job](../classes/v1.Job.html)
#### Returns void
### RepeatStrategy[](#RepeatStrategy)
RepeatStrategy: ((millis, opts, name?) => number)
#### Type declaration
* * (millis, opts, name?): number
* #### Parameters
* millis: number
* opts: [RepeatOptions](../interfaces/v1.RepeatOptions.html)
* `Optional` name: string
#### Returns number
### SandboxedJobProcessor[](#SandboxedJobProcessor)
SandboxedJobProcessor<[T](v1.html#SandboxedJobProcessor.T-7)
, [R](v1.html#SandboxedJobProcessor.R-1)
\>: ((job) => R | PromiseLike) | ((job, callback) => void)
#### Type Parameters
* T = any
* R = any
#### Type declaration
* * (job): R | PromiseLike
* #### Parameters
* job: [SandboxedJob](../interfaces/v1.SandboxedJob.html)
#### Returns R | PromiseLike
#### Type declaration
* * (job, callback): void
* #### Parameters
* job: [SandboxedJob](../interfaces/v1.SandboxedJob.html)
* callback: ((error, result) => void)
* * (error, result): void
* #### Parameters
* error: unknown
* result: R
#### Returns void
#### Returns void
#### See
[https://docs.bullmq.io/guide/workers/sandboxed-processors](https://docs.bullmq.io/guide/workers/sandboxed-processors)
### StalledEventCallback3[](#StalledEventCallback3)
StalledEventCallback3<[T](v1.html#StalledEventCallback3.T-8)
\>: ((job) => void)
#### Type Parameters
* T = any
#### Type declaration
* * (job): void
* #### Parameters
* job: [Job](../classes/v1.Job.html)
#### Returns void
### StreamName[](#StreamName)
StreamName: string
### StreamReadRaw[](#StreamReadRaw)
StreamReadRaw: \[[StreamName](v1.html#StreamName)\
, [EntryRaw](v1.html#EntryRaw)\
\[\]\]\[\]
### WaitingEventCallback3[](#WaitingEventCallback3)
WaitingEventCallback3: ((jobId) => void)
#### Type declaration
* * (jobId): void
* #### Parameters
* jobId: string
#### Returns void
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [ActiveEventCallback3](#ActiveEventCallback3)
* [BackoffFunction](#BackoffFunction)
* [BulkJobOptions](#BulkJobOptions)
* [CleanedEventCallback3](#CleanedEventCallback3)
* [ClusterOptions](#ClusterOptions)
* [CompletedEventCallback3](#CompletedEventCallback3)
* [ConnectionOptions](#ConnectionOptions)
* [EntryId](#EntryId)
* [EntryRaw](#EntryRaw)
* [ErrorEventCallback3](#ErrorEventCallback3)
* [EventCallback3](#EventCallback3)
* [FailedEventCallback3](#FailedEventCallback3)
* [FinishedPropValAttribute](#FinishedPropValAttribute)
* [FinishedStatus](#FinishedStatus)
* [FlowQueuesOpts](#FlowQueuesOpts)
* [JobData](#JobData)
* [JobJsonSandbox](#JobJsonSandbox)
* [JobState](#JobState)
* [JobStatusClean3](#JobStatusClean3)
* [JobType](#JobType)
* [KeysMap](#KeysMap)
* [MinimalQueue](#MinimalQueue)
* [ParentOpts](#ParentOpts)
* [Processor](#Processor)
* [ProgressEventCallback3](#ProgressEventCallback3)
* [RedisClient](#RedisClient)
* [RedisOptions](#RedisOptions)
* [RemovedEventCallback3](#RemovedEventCallback3)
* [RepeatStrategy](#RepeatStrategy)
* [SandboxedJobProcessor](#SandboxedJobProcessor)
* [StalledEventCallback3](#StalledEventCallback3)
* [StreamName](#StreamName)
* [StreamReadRaw](#StreamReadRaw)
* [WaitingEventCallback3](#WaitingEventCallback3)
Generated using [TypeDoc](https://typedoc.org/)
---
# JobScheduler | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [JobScheduler](v5.JobScheduler.html)
Class JobScheduler
==================
QueueBase
#### Description
Base class for all classes that need to interact with queues. This class is normally not used directly, but extended by the other classes.
#### Hierarchy ([view full](../hierarchy.html#v5.JobScheduler)
)
* [QueueBase](v5.QueueBase.html)
* JobScheduler
##### Index
### Constructors
[constructor](v5.JobScheduler.html#constructor)
### Properties
[closing](v5.JobScheduler.html#closing)
[keys](v5.JobScheduler.html#keys)
[name](v5.JobScheduler.html#name)
[opts](v5.JobScheduler.html#opts)
[qualifiedName](v5.JobScheduler.html#qualifiedName)
[toKey](v5.JobScheduler.html#toKey)
### Accessors
[client](v5.JobScheduler.html#client)
[redisVersion](v5.JobScheduler.html#redisVersion)
### Methods
[close](v5.JobScheduler.html#close)
[disconnect](v5.JobScheduler.html#disconnect)
[emit](v5.JobScheduler.html#emit)
[getJobSchedulers](v5.JobScheduler.html#getJobSchedulers)
[getScheduler](v5.JobScheduler.html#getScheduler)
[getSchedulersCount](v5.JobScheduler.html#getSchedulersCount)
[removeJobScheduler](v5.JobScheduler.html#removeJobScheduler)
[trace](v5.JobScheduler.html#trace)
[upsertJobScheduler](v5.JobScheduler.html#upsertJobScheduler)
[waitUntilReady](v5.JobScheduler.html#waitUntilReady)
Constructors
------------
### constructor[](#constructor)
* new JobScheduler(name, opts, Connection?): [JobScheduler](v5.JobScheduler.html)
[](#constructor.new_JobScheduler)
* #### Parameters
* name: string
* opts: [RepeatBaseOptions](../interfaces/v5.RepeatBaseOptions.html)
* `Optional` Connection: typeof [RedisConnection](v5.RedisConnection.html)
#### Returns [JobScheduler](v5.JobScheduler.html)
Properties
----------
### closing[](#closing)
closing: Promise
### keys[](#keys)
keys: [KeysMap](../types/v5.KeysMap.html)
### `Readonly` name[](#name)
name: string
The name of the queue.
### opts[](#opts)
opts: [QueueBaseOptions](../interfaces/v5.QueueBaseOptions.html)
= ...
Options for the queue.
### `Readonly` qualifiedName[](#qualifiedName)
qualifiedName: string
### toKey[](#toKey)
toKey: ((type) => string)
#### Type declaration
* * (type): string
* #### Parameters
* type: string
#### Returns string
Accessors
---------
### client[](#client)
* get client(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>
* Returns a promise that resolves to a redis client. Normally used only by subclasses.
#### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
### redisVersion[](#redisVersion)
* get redisVersion(): string
* Returns the version of the Redis instance the client is connected to,
#### Returns string
Methods
-------
### close[](#close)
* close(): Promise[](#close.close-1)
* Closes the connection and returns a promise that resolves when the connection is closed.
#### Returns Promise
### disconnect[](#disconnect)
* disconnect(): Promise[](#disconnect.disconnect-1)
* Force disconnects a connection.
#### Returns Promise
### emit[](#emit)
* emit(event, ...args): boolean[](#emit.emit-1)
* Emits an event. Normally used by subclasses to emit events.
#### Parameters
* event: string | symbol
The emitted event.
* `Rest` ...args: any\[\]
#### Returns boolean
### getJobSchedulers[](#getJobSchedulers)
* getJobSchedulers<[D](v5.JobScheduler.html#getJobSchedulers.getJobSchedulers-1.D)
\>(start?, end?, asc?): Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[D](v5.JobScheduler.html#getJobSchedulers.getJobSchedulers-1.D)
\>\[\]\>[](#getJobSchedulers.getJobSchedulers-1)
* #### Type Parameters
* D = any
#### Parameters
* start: number = 0
* end: number = -1
* asc: boolean = false
#### Returns Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[D](v5.JobScheduler.html#getJobSchedulers.getJobSchedulers-1.D)
\>\[\]\>
### getScheduler[](#getScheduler)
* getScheduler<[D](v5.JobScheduler.html#getScheduler.getScheduler-1.D-1)
\>(id): Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[D](v5.JobScheduler.html#getScheduler.getScheduler-1.D-1)
\>\>[](#getScheduler.getScheduler-1)
* #### Type Parameters
* D = any
#### Parameters
* id: string
#### Returns Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[D](v5.JobScheduler.html#getScheduler.getScheduler-1.D-1)
\>\>
### getSchedulersCount[](#getSchedulersCount)
* getSchedulersCount(): Promise[](#getSchedulersCount.getSchedulersCount-1)
* #### Returns Promise
### removeJobScheduler[](#removeJobScheduler)
* removeJobScheduler(jobSchedulerId): Promise[](#removeJobScheduler.removeJobScheduler-1)
* #### Parameters
* jobSchedulerId: string
#### Returns Promise
### trace[](#trace)
* trace<[T](v5.JobScheduler.html#trace.trace-1.T)
\>(spanKind, operation, destination, callback, srcPropagationMetadata?): Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>\>[](#trace.trace-1)
* Wraps the code with telemetry and provides a span for configuration.
#### Type Parameters
* T
#### Parameters
* spanKind: [SpanKind](../enums/v5.SpanKind.html)
kind of the span: Producer, Consumer, Internal
* operation: string
operation name (such as add, process, etc)
* destination: string
destination name (normally the queue name)
* callback: ((span?, dstPropagationMetadata?) => [T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>)
code to wrap with telemetry
* * (span?, dstPropagationMetadata?): [T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>
* #### Parameters
* `Optional` span: [Span](../interfaces/v5.Span.html)
* `Optional` dstPropagationMetadata: string
#### Returns [T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>
* `Optional` srcPropagationMetadata: string
#### Returns Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>\>
### upsertJobScheduler[](#upsertJobScheduler)
* upsertJobScheduler<[T](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.T-1)
, [R](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.R)
, [N](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.N)
\>(jobSchedulerId, repeatOpts, jobName, jobData, opts, \_\_namedParameters): Promise<[Job](v5.Job.html)
<[T](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.T-1)
, [R](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.R)
, [N](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.N)
\>\>[](#upsertJobScheduler.upsertJobScheduler-1)
* #### Type Parameters
* T = any
* R = any
* N extends string = string
#### Parameters
* jobSchedulerId: string
* repeatOpts: Omit<[RepeatOptions](../interfaces/v5.RepeatOptions.html)
, "key" | "prevMillis"\>
* jobName: [N](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.N)
* jobData: [T](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.T-1)
* opts: [JobSchedulerTemplateOptions](../types/v5.JobSchedulerTemplateOptions.html)
* \_\_namedParameters: {
override: boolean;
producerId?: string;
}
* ##### override: boolean
* ##### `Optional` producerId?: string
#### Returns Promise<[Job](v5.Job.html)
<[T](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.T-1)
, [R](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.R)
, [N](v5.JobScheduler.html#upsertJobScheduler.upsertJobScheduler-1.N)
\>\>
### waitUntilReady[](#waitUntilReady)
* waitUntilReady(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>[](#waitUntilReady.waitUntilReady-1)
* #### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [closing](#closing)
* [keys](#keys)
* [name](#name)
* [opts](#opts)
* [qualifiedName](#qualifiedName)
* [toKey](#toKey)
* [client](#client)
* [redisVersion](#redisVersion)
* [close](#close)
* [disconnect](#disconnect)
* [emit](#emit)
* [getJobSchedulers](#getJobSchedulers)
* [getScheduler](#getScheduler)
* [getSchedulersCount](#getSchedulersCount)
* [removeJobScheduler](#removeJobScheduler)
* [trace](#trace)
* [upsertJobScheduler](#upsertJobScheduler)
* [waitUntilReady](#waitUntilReady)
Generated using [TypeDoc](https://typedoc.org/)
---
# QueueEventsProducer | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [QueueEventsProducer](v5.QueueEventsProducer.html)
Class QueueEventsProducer
=========================
The QueueEventsProducer class is used for publishing custom events.
#### Hierarchy ([view full](../hierarchy.html#v5.QueueEventsProducer)
)
* [QueueBase](v5.QueueBase.html)
* QueueEventsProducer
##### Index
### Constructors
[constructor](v5.QueueEventsProducer.html#constructor)
### Properties
[closing](v5.QueueEventsProducer.html#closing)
[keys](v5.QueueEventsProducer.html#keys)
[name](v5.QueueEventsProducer.html#name)
[opts](v5.QueueEventsProducer.html#opts)
[qualifiedName](v5.QueueEventsProducer.html#qualifiedName)
[toKey](v5.QueueEventsProducer.html#toKey)
### Accessors
[client](v5.QueueEventsProducer.html#client)
[redisVersion](v5.QueueEventsProducer.html#redisVersion)
### Methods
[close](v5.QueueEventsProducer.html#close)
[disconnect](v5.QueueEventsProducer.html#disconnect)
[emit](v5.QueueEventsProducer.html#emit)
[publishEvent](v5.QueueEventsProducer.html#publishEvent)
[trace](v5.QueueEventsProducer.html#trace)
[waitUntilReady](v5.QueueEventsProducer.html#waitUntilReady)
Constructors
------------
### constructor[](#constructor)
* new QueueEventsProducer(name, opts?, Connection?): [QueueEventsProducer](v5.QueueEventsProducer.html)
[](#constructor.new_QueueEventsProducer)
* #### Parameters
* name: string
* opts: [QueueBaseOptions](../interfaces/v5.QueueBaseOptions.html)
= ...
* `Optional` Connection: typeof [RedisConnection](v5.RedisConnection.html)
#### Returns [QueueEventsProducer](v5.QueueEventsProducer.html)
Properties
----------
### closing[](#closing)
closing: Promise
### keys[](#keys)
keys: [KeysMap](../types/v5.KeysMap.html)
### `Readonly` name[](#name)
name: string
The name of the queue.
### opts[](#opts)
opts: [QueueBaseOptions](../interfaces/v5.QueueBaseOptions.html)
= ...
Options for the queue.
### `Readonly` qualifiedName[](#qualifiedName)
qualifiedName: string
### toKey[](#toKey)
toKey: ((type) => string)
#### Type declaration
* * (type): string
* #### Parameters
* type: string
#### Returns string
Accessors
---------
### client[](#client)
* get client(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>
* Returns a promise that resolves to a redis client. Normally used only by subclasses.
#### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
### redisVersion[](#redisVersion)
* get redisVersion(): string
* Returns the version of the Redis instance the client is connected to,
#### Returns string
Methods
-------
### close[](#close)
* close(): Promise[](#close.close-1)
* Closes the connection and returns a promise that resolves when the connection is closed.
#### Returns Promise
### disconnect[](#disconnect)
* disconnect(): Promise[](#disconnect.disconnect-1)
* Force disconnects a connection.
#### Returns Promise
### emit[](#emit)
* emit(event, ...args): boolean[](#emit.emit-1)
* Emits an event. Normally used by subclasses to emit events.
#### Parameters
* event: string | symbol
The emitted event.
* `Rest` ...args: any\[\]
#### Returns boolean
### publishEvent[](#publishEvent)
* publishEvent<[T](v5.QueueEventsProducer.html#publishEvent.publishEvent-1.T)
\>(argsObj, maxEvents?): Promise[](#publishEvent.publishEvent-1)
* Publish custom event to be processed in QueueEvents.
#### Type Parameters
* T extends {
eventName: string;
}
#### Parameters
* argsObj: [T](v5.QueueEventsProducer.html#publishEvent.publishEvent-1.T)
Event payload
* maxEvents: number = 1000
Max quantity of events to be saved
#### Returns Promise
### trace[](#trace)
* trace<[T](v5.QueueEventsProducer.html#trace.trace-1.T-1)
\>(spanKind, operation, destination, callback, srcPropagationMetadata?): Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>\>[](#trace.trace-1)
* Wraps the code with telemetry and provides a span for configuration.
#### Type Parameters
* T
#### Parameters
* spanKind: [SpanKind](../enums/v5.SpanKind.html)
kind of the span: Producer, Consumer, Internal
* operation: string
operation name (such as add, process, etc)
* destination: string
destination name (normally the queue name)
* callback: ((span?, dstPropagationMetadata?) => [T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>)
code to wrap with telemetry
* * (span?, dstPropagationMetadata?): [T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>
* #### Parameters
* `Optional` span: [Span](../interfaces/v5.Span.html)
* `Optional` dstPropagationMetadata: string
#### Returns [T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>
* `Optional` srcPropagationMetadata: string
#### Returns Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
| Promise<[T](v5.JobScheduler.html#trace.trace-1.T)
\>\>
### waitUntilReady[](#waitUntilReady)
* waitUntilReady(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>[](#waitUntilReady.waitUntilReady-1)
* #### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
### Settings
#### Member Visibility
* Inherited
#### Theme
OSLightDark
### On This Page
* [constructor](#constructor)
* [closing](#closing)
* [keys](#keys)
* [name](#name)
* [opts](#opts)
* [qualifiedName](#qualifiedName)
* [toKey](#toKey)
* [client](#client)
* [redisVersion](#redisVersion)
* [close](#close)
* [disconnect](#disconnect)
* [emit](#emit)
* [publishEvent](#publishEvent)
* [trace](#trace)
* [waitUntilReady](#waitUntilReady)
Generated using [TypeDoc](https://typedoc.org/)
---
# Queue | bullmq - v5.41.8
* [bullmq](../index.html)
* [v5](../modules/v5.html)
* [Queue](v5.Queue.html)
Class Queue
==============================================================================================
Queue
This class provides methods to add jobs to a queue and some other high-level administration such as pausing or deleting queues.
#### Example
import { Queue } from 'bullmq';interface MyDataType { foo: string;}interface MyResultType { bar: string;}const queue = new Queue('myQueue');
#### Type Parameters
* DataTypeOrJob = any
* DefaultResultType = any
* DefaultNameType extends string = string
* DataType = ExtractDataType<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
\>
The type of the data that the job will process.
* ResultType = ExtractResultType<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultResultType](v5.Queue.html#constructor.new_Queue.DefaultResultType-1)
\>
The type of the result of the job.
* NameType extends string = ExtractNameType<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultNameType](v5.Queue.html#constructor.new_Queue.DefaultNameType-1)
\>
The type of the name of the job.
#### Hierarchy ([view full](../hierarchy.html#v5.Queue)
)
* [QueueGetters](v5.QueueGetters.html)
\>
* Queue
##### Index
### Constructors
[constructor](v5.Queue.html#constructor)
### Properties
[closing](v5.Queue.html#closing)
[jobsOpts](v5.Queue.html#jobsOpts)
[keys](v5.Queue.html#keys)
[name](v5.Queue.html#name)
[opts](v5.Queue.html#opts)
[qualifiedName](v5.Queue.html#qualifiedName)
[toKey](v5.Queue.html#toKey)
[token](v5.Queue.html#token)
### Accessors
[client](v5.Queue.html#client)
[defaultJobOptions](v5.Queue.html#defaultJobOptions)
[jobScheduler](v5.Queue.html#jobScheduler)
[metaValues](v5.Queue.html#metaValues)
[redisVersion](v5.Queue.html#redisVersion)
[repeat](v5.Queue.html#repeat)
### Methods
[add](v5.Queue.html#add)
[addBulk](v5.Queue.html#addBulk)
[addJobLog](v5.Queue.html#addJobLog)
[clean](v5.Queue.html#clean)
[close](v5.Queue.html#close)
[count](v5.Queue.html#count)
[disconnect](v5.Queue.html#disconnect)
[drain](v5.Queue.html#drain)
[emit](v5.Queue.html#emit)
[exportPrometheusMetrics](v5.Queue.html#exportPrometheusMetrics)
[getActive](v5.Queue.html#getActive)
[getActiveCount](v5.Queue.html#getActiveCount)
[getCompleted](v5.Queue.html#getCompleted)
[getCompletedCount](v5.Queue.html#getCompletedCount)
[getCountsPerPriority](v5.Queue.html#getCountsPerPriority)
[getDebounceJobId](v5.Queue.html#getDebounceJobId)
[getDeduplicationJobId](v5.Queue.html#getDeduplicationJobId)
[getDelayed](v5.Queue.html#getDelayed)
[getDelayedCount](v5.Queue.html#getDelayedCount)
[getDependencies](v5.Queue.html#getDependencies)
[getFailed](v5.Queue.html#getFailed)
[getFailedCount](v5.Queue.html#getFailedCount)
[getGlobalConcurrency](v5.Queue.html#getGlobalConcurrency)
[getJob](v5.Queue.html#getJob)
[getJobCountByTypes](v5.Queue.html#getJobCountByTypes)
[getJobCounts](v5.Queue.html#getJobCounts)
[getJobLogs](v5.Queue.html#getJobLogs)
[getJobScheduler](v5.Queue.html#getJobScheduler)
[getJobSchedulers](v5.Queue.html#getJobSchedulers)
[getJobSchedulersCount](v5.Queue.html#getJobSchedulersCount)
[getJobState](v5.Queue.html#getJobState)
[getJobs](v5.Queue.html#getJobs)
[getMetrics](v5.Queue.html#getMetrics)
[getPrioritized](v5.Queue.html#getPrioritized)
[getPrioritizedCount](v5.Queue.html#getPrioritizedCount)
[getQueueEvents](v5.Queue.html#getQueueEvents)
[getRanges](v5.Queue.html#getRanges)
[getRateLimitTtl](v5.Queue.html#getRateLimitTtl)
[getRepeatableJobs](v5.Queue.html#getRepeatableJobs)
[getVersion](v5.Queue.html#getVersion)
[getWaiting](v5.Queue.html#getWaiting)
[getWaitingChildren](v5.Queue.html#getWaitingChildren)
[getWaitingChildrenCount](v5.Queue.html#getWaitingChildrenCount)
[getWaitingCount](v5.Queue.html#getWaitingCount)
[getWorkers](v5.Queue.html#getWorkers)
[getWorkersCount](v5.Queue.html#getWorkersCount)
[isMaxed](v5.Queue.html#isMaxed)
[isPaused](v5.Queue.html#isPaused)
[obliterate](v5.Queue.html#obliterate)
[off](v5.Queue.html#off)
[on](v5.Queue.html#on)
[once](v5.Queue.html#once)
[pause](v5.Queue.html#pause)
[promoteJobs](v5.Queue.html#promoteJobs)
[rateLimit](v5.Queue.html#rateLimit)
[remove](v5.Queue.html#remove)
[removeDebounceKey](v5.Queue.html#removeDebounceKey)
[removeDeduplicationKey](v5.Queue.html#removeDeduplicationKey)
[removeDeprecatedPriorityKey](v5.Queue.html#removeDeprecatedPriorityKey)
[removeGlobalConcurrency](v5.Queue.html#removeGlobalConcurrency)
[removeJobScheduler](v5.Queue.html#removeJobScheduler)
[removeRateLimitKey](v5.Queue.html#removeRateLimitKey)
[removeRepeatable](v5.Queue.html#removeRepeatable)
[removeRepeatableByKey](v5.Queue.html#removeRepeatableByKey)
[resume](v5.Queue.html#resume)
[retryJobs](v5.Queue.html#retryJobs)
[setGlobalConcurrency](v5.Queue.html#setGlobalConcurrency)
[trace](v5.Queue.html#trace)
[trimEvents](v5.Queue.html#trimEvents)
[updateJobProgress](v5.Queue.html#updateJobProgress)
[upsertJobScheduler](v5.Queue.html#upsertJobScheduler)
[waitUntilReady](v5.Queue.html#waitUntilReady)
Constructors
------------
### constructor[](#constructor)
* new Queue<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultResultType](v5.Queue.html#constructor.new_Queue.DefaultResultType-1)
, [DefaultNameType](v5.Queue.html#constructor.new_Queue.DefaultNameType-1)
, [DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>(name, opts?, Connection?): [Queue](v5.Queue.html)
<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultResultType](v5.Queue.html#constructor.new_Queue.DefaultResultType-1)
, [DefaultNameType](v5.Queue.html#constructor.new_Queue.DefaultNameType-1)
, [DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>[](#constructor.new_Queue)
* #### Type Parameters
* DataTypeOrJob = any
* DefaultResultType = any
* DefaultNameType extends string = string
* DataType = ExtractDataType<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
\>
* ResultType = ExtractResultType<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultResultType](v5.Queue.html#constructor.new_Queue.DefaultResultType-1)
\>
* NameType extends string = ExtractNameType<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultNameType](v5.Queue.html#constructor.new_Queue.DefaultNameType-1)
\>
#### Parameters
* name: string
* `Optional` opts: [QueueOptions](../interfaces/v5.QueueOptions.html)
* `Optional` Connection: typeof [RedisConnection](v5.RedisConnection.html)
#### Returns [Queue](v5.Queue.html)
<[DataTypeOrJob](v5.Queue.html#constructor.new_Queue.DataTypeOrJob-1)
, [DefaultResultType](v5.Queue.html#constructor.new_Queue.DefaultResultType-1)
, [DefaultNameType](v5.Queue.html#constructor.new_Queue.DefaultNameType-1)
, [DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>
Properties
----------
### closing[](#closing)
closing: Promise
### jobsOpts[](#jobsOpts)
jobsOpts: [BaseJobOptions](../interfaces/v5.BaseJobOptions.html)
### keys[](#keys)
keys: [KeysMap](../types/v5.KeysMap.html)
### `Readonly` name[](#name)
name: string
The name of the queue.
### opts[](#opts)
opts: [QueueOptions](../interfaces/v5.QueueOptions.html)
Options for the queue.
### `Readonly` qualifiedName[](#qualifiedName)
qualifiedName: string
### toKey[](#toKey)
toKey: ((type) => string)
#### Type declaration
* * (type): string
* #### Parameters
* type: string
#### Returns string
### token[](#token)
token: string = ...
Accessors
---------
### client[](#client)
* get client(): Promise<[RedisClient](../types/v5.RedisClient.html)
\>
* Returns a promise that resolves to a redis client. Normally used only by subclasses.
#### Returns Promise<[RedisClient](../types/v5.RedisClient.html)
\>
### defaultJobOptions[](#defaultJobOptions)
* get defaultJobOptions(): [JobsOptions](../types/v5.JobsOptions.html)
* Returns this instance current default job options.
#### Returns [JobsOptions](../types/v5.JobsOptions.html)
### jobScheduler[](#jobScheduler)
* get jobScheduler(): Promise<[JobScheduler](v5.JobScheduler.html)
\>
* #### Returns Promise<[JobScheduler](v5.JobScheduler.html)
\>
### metaValues[](#metaValues)
* get metaValues(): Record
* #### Returns Record
### redisVersion[](#redisVersion)
* get redisVersion(): string
* Returns the version of the Redis instance the client is connected to,
#### Returns string
### repeat[](#repeat)
* get repeat(): Promise<[Repeat](v5.Repeat.html)
\>
* #### Returns Promise<[Repeat](v5.Repeat.html)
\>
Methods
-------
### add[](#add)
* add(name, data, opts?): Promise<[Job](v5.Job.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>\>[](#add.add-1)
* Adds a new job to the queue.
#### Parameters
* name: [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
Name of the job to be added to the queue.
* data: [DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
Arbitrary data to append to the job.
* `Optional` opts: [JobsOptions](../types/v5.JobsOptions.html)
Job options that affects how the job is going to be processed.
#### Returns Promise<[Job](v5.Job.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>\>
### addBulk[](#addBulk)
* addBulk(jobs): Promise<[Job](v5.Job.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>\[\]\>[](#addBulk.addBulk-1)
* Adds an array of jobs to the queue. This method may be faster than adding one job at a time in a sequence.
#### Parameters
* jobs: {
data: [DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
;
name: [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
;
opts?: [BulkJobOptions](../types/v5.BulkJobOptions.html)
;
}\[\]
The array of jobs to add to the queue. Each job is defined by 3 properties, 'name', 'data' and 'opts'. They follow the same signature as 'Queue.add'.
#### Returns Promise<[Job](v5.Job.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
, [ResultType](v5.Queue.html#constructor.new_Queue.ResultType-1)
, [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
\>\[\]\>
### addJobLog[](#addJobLog)
* addJobLog(jobId, logRow, keepLogs?): Promise[](#addJobLog.addJobLog-1)
* Logs one row of job's log data.
#### Parameters
* jobId: string
The job id to log against.
* logRow: string
String with log data to be logged.
* `Optional` keepLogs: number
Max number of log entries to keep (0 for unlimited).
#### Returns Promise
The total number of log entries for this job so far.
### clean[](#clean)
* clean(grace, limit, type?): Promise[](#clean.clean-1)
* Cleans jobs from a queue. Similar to drain but keeps jobs within a certain grace period.
#### Parameters
* grace: number
The grace period in milliseconds
* limit: number
Max number of jobs to clean
* type: "failed" | "active" | "paused" | "completed" | "wait" | "prioritized" | "delayed" = 'completed'
The type of job to clean Possible values are completed, wait, active, paused, delayed, failed. Defaults to completed.
#### Returns Promise
Id jobs from the deleted records
### close[](#close)
* close(): Promise[](#close.close-1)
* Close the queue instance.
#### Returns Promise
### count[](#count)
* count(): Promise[](#count.count-1)
* Returns the number of jobs waiting to be processed. This includes jobs that are "waiting" or "delayed" or "prioritized" or "waiting-children".
#### Returns Promise
### disconnect[](#disconnect)
* disconnect(): Promise[](#disconnect.disconnect-1)
* Force disconnects a connection.
#### Returns Promise
### drain[](#drain)
* drain(delayed?): Promise[](#drain.drain-1)
* Drains the queue, i.e., removes all jobs that are waiting or delayed, but not active, completed or failed.
#### Parameters
* delayed: boolean = false
Pass true if it should also clean the delayed jobs.
#### Returns Promise
### emit[](#emit)
* emit<[U](v5.Queue.html#emit.emit-1.U)
\>(event, ...args): boolean[](#emit.emit-1)
* Emits an event. Normally used by subclasses to emit events.
#### Type Parameters
* U extends keyof [QueueListener](../interfaces/v5.QueueListener.html)
\>
#### Parameters
* event: [U](v5.Queue.html#emit.emit-1.U)
The emitted event.
* `Rest` ...args: Parameters<[QueueListener](../interfaces/v5.QueueListener.html)
\>\[[U](v5.Queue.html#emit.emit-1.U)\
\]\>
#### Returns boolean
### exportPrometheusMetrics[](#exportPrometheusMetrics)
* exportPrometheusMetrics(): Promise[](#exportPrometheusMetrics.exportPrometheusMetrics-1)
* Export the metrics for the queue in the Prometheus format. Automatically exports all the counts returned by getJobCounts().
#### Returns Promise
* Returns a string with the metrics in the Prometheus format.
#### Sa
[https://prometheus.io/docs/instrumenting/exposition\_formats/](https://prometheus.io/docs/instrumenting/exposition_formats/)
### getActive[](#getActive)
* getActive(start?, end?): Promise\[\]\>[](#getActive.getActive-1)
* Returns the jobs that are in the "active" status.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getActiveCount[](#getActiveCount)
* getActiveCount(): Promise[](#getActiveCount.getActiveCount-1)
* Returns the number of jobs in active status.
#### Returns Promise
### getCompleted[](#getCompleted)
* getCompleted(start?, end?): Promise\[\]\>[](#getCompleted.getCompleted-1)
* Returns the jobs that are in the "completed" status.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getCompletedCount[](#getCompletedCount)
* getCompletedCount(): Promise[](#getCompletedCount.getCompletedCount-1)
* Returns the number of jobs in completed status.
#### Returns Promise
### getCountsPerPriority[](#getCountsPerPriority)
* getCountsPerPriority(priorities): Promise<{
\[index: string\]: number;
}\>[](#getCountsPerPriority.getCountsPerPriority-1)
* Returns the number of jobs per priority.
#### Parameters
* priorities: number\[\]
#### Returns Promise<{
\[index: string\]: number;
}\>
### getDebounceJobId[](#getDebounceJobId)
* getDebounceJobId(id): Promise[](#getDebounceJobId.getDebounceJobId-1)
* Get jobId that starts debounced state.
#### Parameters
* id: string
debounce identifier
#### Returns Promise
#### Deprecated
use getDeduplicationJobId method
### getDeduplicationJobId[](#getDeduplicationJobId)
* getDeduplicationJobId(id): Promise[](#getDeduplicationJobId.getDeduplicationJobId-1)
* Get jobId from deduplicated state.
#### Parameters
* id: string
deduplication identifier
#### Returns Promise
### getDelayed[](#getDelayed)
* getDelayed(start?, end?): Promise\[\]\>[](#getDelayed.getDelayed-1)
* Returns the jobs that are in the "delayed" status.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getDelayedCount[](#getDelayedCount)
* getDelayedCount(): Promise[](#getDelayedCount.getDelayedCount-1)
* Returns the number of jobs in delayed status.
#### Returns Promise
### getDependencies[](#getDependencies)
* getDependencies(parentId, type, start, end): Promise<{
items: {
err?: string;
id: string;
v?: any;
}\[\];
jobs: [JobJsonRaw](../interfaces/v5.JobJsonRaw.html)
\[\];
total: number;
}\>[](#getDependencies.getDependencies-1)
* Returns the qualified job ids and the raw job data (if available) of the children jobs of the given parent job. It is possible to get either the already processed children, in this case an array of qualified job ids and their result values will be returned, or the pending children, in this case an array of qualified job ids will be returned. A qualified job id is a string representing the job id in a given queue, for example: "bull:myqueue:jobid".
#### Parameters
* parentId: string
The id of the parent job
* type: "pending" | "processed"
"processed" | "pending"
* start: number
* end: number
#### Returns Promise<{
items: {
err?: string;
id: string;
v?: any;
}\[\];
jobs: [JobJsonRaw](../interfaces/v5.JobJsonRaw.html)
\[\];
total: number;
}\>
### getFailed[](#getFailed)
* getFailed(start?, end?): Promise\[\]\>[](#getFailed.getFailed-1)
* Returns the jobs that are in the "failed" status.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getFailedCount[](#getFailedCount)
* getFailedCount(): Promise[](#getFailedCount.getFailedCount-1)
* Returns the number of jobs in failed status.
#### Returns Promise
### getGlobalConcurrency[](#getGlobalConcurrency)
* getGlobalConcurrency(): Promise[](#getGlobalConcurrency.getGlobalConcurrency-1)
* Get global concurrency value. Returns null in case no value is set.
#### Returns Promise
### getJob[](#getJob)
* getJob(jobId): Promise\>[](#getJob.getJob-1)
* #### Parameters
* jobId: string
#### Returns Promise\>
### getJobCountByTypes[](#getJobCountByTypes)
* getJobCountByTypes(...types): Promise[](#getJobCountByTypes.getJobCountByTypes-1)
* Job counts by type
Queue#getJobCountByTypes('completed') => completed count Queue#getJobCountByTypes('completed,failed') => completed + failed count Queue#getJobCountByTypes('completed', 'failed') => completed + failed count Queue#getJobCountByTypes('completed', 'waiting', 'failed') => completed + waiting + failed count
#### Parameters
* `Rest` ...types: [JobType](../types/v5.JobType.html)
\[\]
#### Returns Promise
### getJobCounts[](#getJobCounts)
* getJobCounts(...types): Promise<{
\[index: string\]: number;
}\>[](#getJobCounts.getJobCounts-1)
* Returns the job counts for each type specified or every list/set in the queue by default.
#### Parameters
* `Rest` ...types: [JobType](../types/v5.JobType.html)
\[\]
#### Returns Promise<{
\[index: string\]: number;
}\>
An object, key (type) and value (count)
### getJobLogs[](#getJobLogs)
* getJobLogs(jobId, start?, end?, asc?): Promise<{
count: number;
logs: string\[\];
}\>[](#getJobLogs.getJobLogs-1)
* Returns the logs for a given Job.
#### Parameters
* jobId: string
the id of the job to get the logs for.
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
* asc: boolean = true
if true, the jobs will be returned in ascending order.
#### Returns Promise<{
count: number;
logs: string\[\];
}\>
### getJobScheduler[](#getJobScheduler)
* getJobScheduler(id): Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
\>\>[](#getJobScheduler.getJobScheduler-1)
* Get Job Scheduler by id
#### Parameters
* id: string
identifier of scheduler.
#### Returns Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
\>\>
### getJobSchedulers[](#getJobSchedulers)
* getJobSchedulers(start?, end?, asc?): Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
\>\[\]\>[](#getJobSchedulers.getJobSchedulers-1)
* Get all Job Schedulers
#### Parameters
* `Optional` start: number
Offset of first scheduler to return.
* `Optional` end: number
Offset of last scheduler to return.
* `Optional` asc: boolean
Determine the order in which schedulers are returned based on their next execution time.
#### Returns Promise<[JobSchedulerJson](../interfaces/v5.JobSchedulerJson.html)
<[DataType](v5.Queue.html#constructor.new_Queue.DataType-1)
\>\[\]\>
### getJobSchedulersCount[](#getJobSchedulersCount)
* getJobSchedulersCount(): Promise[](#getJobSchedulersCount.getJobSchedulersCount-1)
* Get the number of job schedulers.
#### Returns Promise
The number of job schedulers.
### getJobState[](#getJobState)
* getJobState(jobId): Promise<"unknown" | [JobState](../types/v5.JobState.html)
\>[](#getJobState.getJobState-1)
* Get current job state.
#### Parameters
* jobId: string
job identifier.
#### Returns Promise<"unknown" | [JobState](../types/v5.JobState.html)
\>
Returns one of these values: 'completed', 'failed', 'delayed', 'active', 'waiting', 'waiting-children', 'unknown'.
### getJobs[](#getJobs)
* getJobs(types?, start?, end?, asc?): Promise\[\]\>[](#getJobs.getJobs-1)
* Returns the jobs that are on the given statuses (note that JobType is synonym for job status)
#### Parameters
* `Optional` types: [JobType](../types/v5.JobType.html)
| [JobType](../types/v5.JobType.html)
\[\]
the statuses of the jobs to return.
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
* asc: boolean = false
if true, the jobs will be returned in ascending order.
#### Returns Promise\[\]\>
### getMetrics[](#getMetrics)
* getMetrics(type, start?, end?): Promise<[Metrics](../interfaces/v5.Metrics.html)
\>[](#getMetrics.getMetrics-1)
* Get queue metrics related to the queue.
This method returns the gathered metrics for the queue. The metrics are represented as an array of job counts per unit of time (1 minute).
#### Parameters
* type: "failed" | "completed"
* start: number = 0
Start point of the metrics, where 0 is the newest point to be returned.
* end: number = -1
End point of the metrics, where -1 is the oldest point to be returned.
#### Returns Promise<[Metrics](../interfaces/v5.Metrics.html)
\>
* Returns an object with queue metrics.
### getPrioritized[](#getPrioritized)
* getPrioritized(start?, end?): Promise\[\]\>[](#getPrioritized.getPrioritized-1)
* Returns the jobs that are in the "prioritized" status.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getPrioritizedCount[](#getPrioritizedCount)
* getPrioritizedCount(): Promise[](#getPrioritizedCount.getPrioritizedCount-1)
* Returns the number of jobs in prioritized status.
#### Returns Promise
### getQueueEvents[](#getQueueEvents)
* getQueueEvents(): Promise<{
\[index: string\]: string;
}\[\]\>[](#getQueueEvents.getQueueEvents-1)
* Get queue events list related to the queue. Note: GCP does not support SETNAME, so this call will not work
#### Returns Promise<{
\[index: string\]: string;
}\[\]\>
* Returns an array with queue events info.
#### Deprecated
do not use this method, it will be removed in the future.
### getRanges[](#getRanges)
* getRanges(types, start?, end?, asc?): Promise[](#getRanges.getRanges-1)
* #### Parameters
* types: [JobType](../types/v5.JobType.html)
\[\]
* start: number = 0
* end: number = 1
* asc: boolean = false
#### Returns Promise
### getRateLimitTtl[](#getRateLimitTtl)
* getRateLimitTtl(maxJobs?): Promise[](#getRateLimitTtl.getRateLimitTtl-1)
* Returns the time to live for a rate limited key in milliseconds.
#### Parameters
* `Optional` maxJobs: number
max jobs to be considered in rate limit state. If not passed it will return the remaining ttl without considering if max jobs is excedeed.
#### Returns Promise
\-2 if the key does not exist. -1 if the key exists but has no associated expire.
#### See
[https://redis.io/commands/pttl/](https://redis.io/commands/pttl/)
### getRepeatableJobs[](#getRepeatableJobs)
* getRepeatableJobs(start?, end?, asc?): Promise<[RepeatableJob](../types/v5.RepeatableJob.html)
\[\]\>[](#getRepeatableJobs.getRepeatableJobs-1)
* Get all repeatable meta jobs.
#### Parameters
* `Optional` start: number
Offset of first job to return.
* `Optional` end: number
Offset of last job to return.
* `Optional` asc: boolean
Determine the order in which jobs are returned based on their next execution time.
#### Returns Promise<[RepeatableJob](../types/v5.RepeatableJob.html)
\[\]\>
#### Deprecated
This method is deprecated and will be removed in v6. Use getJobSchedulers instead.
### getVersion[](#getVersion)
* getVersion(): Promise[](#getVersion.getVersion-1)
* Get library version.
#### Returns Promise
the content of the meta.library field.
### getWaiting[](#getWaiting)
* getWaiting(start?, end?): Promise\[\]\>[](#getWaiting.getWaiting-1)
* Returns the jobs that are in the "waiting" status.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getWaitingChildren[](#getWaitingChildren)
* getWaitingChildren(start?, end?): Promise\[\]\>[](#getWaitingChildren.getWaitingChildren-1)
* Returns the jobs that are in the "waiting-children" status. I.E. parent jobs that have at least one child that has not completed yet.
#### Parameters
* start: number = 0
zero based index from where to start returning jobs.
* end: number = -1
zero based index where to stop returning jobs.
#### Returns Promise\[\]\>
### getWaitingChildrenCount[](#getWaitingChildrenCount)
* getWaitingChildrenCount(): Promise[](#getWaitingChildrenCount.getWaitingChildrenCount-1)
* Returns the number of jobs in waiting-children status.
#### Returns Promise
### getWaitingCount[](#getWaitingCount)
* getWaitingCount(): Promise[](#getWaitingCount.getWaitingCount-1)
* Returns the number of jobs in waiting or paused statuses.
#### Returns Promise
### getWorkers[](#getWorkers)
* getWorkers(): Promise<{
\[index: string\]: string;
}\[\]\>[](#getWorkers.getWorkers-1)
* Get the worker list related to the queue. i.e. all the known workers that are available to process jobs for this queue. Note: GCP does not support SETNAME, so this call will not work
#### Returns Promise<{
\[index: string\]: string;
}\[\]\>
* Returns an array with workers info.
### getWorkersCount[](#getWorkersCount)
* getWorkersCount(): Promise[](#getWorkersCount.getWorkersCount-1)
* Returns the current count of workers for the queue.
getWorkersCount(): Promise
#### Returns Promise
### isMaxed[](#isMaxed)
* isMaxed(): Promise[](#isMaxed.isMaxed-1)
* Returns true if the queue is currently maxed.
#### Returns Promise
### isPaused[](#isPaused)
* isPaused(): Promise[](#isPaused.isPaused-1)
* Returns true if the queue is currently paused.
#### Returns Promise
### obliterate[](#obliterate)
* obliterate(opts?): Promise[](#obliterate.obliterate-1)
* Completely destroys the queue and all of its contents irreversibly. This method will the _pause_ the queue and requires that there are no active jobs. It is possible to bypass this requirement, i.e. not having active jobs using the "force" option.
Note: This operation requires to iterate on all the jobs stored in the queue and can be slow for very large queues.
#### Parameters
* `Optional` opts: [ObliterateOpts](../interfaces/v5.ObliterateOpts.html)
Obliterate options.
#### Returns Promise
### off[](#off)
* off<[U](v5.Queue.html#off.off-1.U-1)
\>(eventName, listener): this[](#off.off-1)
* #### Type Parameters
* U extends keyof [QueueListener](../interfaces/v5.QueueListener.html)
\>
#### Parameters
* eventName: [U](v5.Queue.html#off.off-1.U-1)
* listener: [QueueListener](../interfaces/v5.QueueListener.html)
\>\[[U](v5.Queue.html#off.off-1.U-1)\
\]
#### Returns this
### on[](#on)
* on<[U](v5.Queue.html#on.on-1.U-2)
\>(event, listener): this[](#on.on-1)
* #### Type Parameters
* U extends keyof [QueueListener](../interfaces/v5.QueueListener.html)
\>
#### Parameters
* event: [U](v5.Queue.html#on.on-1.U-2)
* listener: [QueueListener](../interfaces/v5.QueueListener.html)
\>\[[U](v5.Queue.html#on.on-1.U-2)\
\]
#### Returns this
### once[](#once)
* once<[U](v5.Queue.html#once.once-1.U-3)
\>(event, listener): this[](#once.once-1)
* #### Type Parameters
* U extends keyof [QueueListener](../interfaces/v5.QueueListener.html)
\>
#### Parameters
* event: [U](v5.Queue.html#once.once-1.U-3)
* listener: [QueueListener](../interfaces/v5.QueueListener.html)
\>\[[U](v5.Queue.html#once.once-1.U-3)\
\]
#### Returns this
### pause[](#pause)
* pause(): Promise[](#pause.pause-1)
* Pauses the processing of this queue globally.
We use an atomic RENAME operation on the wait queue. Since we have blocking calls with BRPOPLPUSH on the wait queue, as long as the queue is renamed to 'paused', no new jobs will be processed (the current ones will run until finalized).
Adding jobs requires a LUA script to check first if the paused list exist and in that case it will add it there instead of the wait list.
#### Returns Promise
### promoteJobs[](#promoteJobs)
* promoteJobs(opts?): Promise[](#promoteJobs.promoteJobs-1)
* Promote all the delayed jobs.
#### Parameters
* opts: {
count?: number;
} = {}
* ##### `Optional` count?: number
#### Returns Promise
### rateLimit[](#rateLimit)
* rateLimit(expireTimeMs): Promise[](#rateLimit.rateLimit-1)
* Overrides the rate limit to be active for the next jobs.
#### Parameters
* expireTimeMs: number
expire time in ms of this rate limit.
#### Returns Promise
### remove[](#remove)
* remove(jobId, opts?): Promise[](#remove.remove-1)
* Removes the given job from the queue as well as all its dependencies.
#### Parameters
* jobId: string
The id of the job to remove
* opts: {
removeChildren: boolean;
} = {}
Options to remove a job
* ##### removeChildren: boolean
#### Returns Promise
1 if it managed to remove the job or 0 if the job or any of its dependencies were locked.
### removeDebounceKey[](#removeDebounceKey)
* removeDebounceKey(id): Promise[](#removeDebounceKey.removeDebounceKey-1)
* Removes a debounce key.
#### Parameters
* id: string
identifier
#### Returns Promise
#### Deprecated
use removeDeduplicationKey
### removeDeduplicationKey[](#removeDeduplicationKey)
* removeDeduplicationKey(id): Promise[](#removeDeduplicationKey.removeDeduplicationKey-1)
* Removes a deduplication key.
#### Parameters
* id: string
identifier
#### Returns Promise
### removeDeprecatedPriorityKey[](#removeDeprecatedPriorityKey)
* removeDeprecatedPriorityKey(): Promise[](#removeDeprecatedPriorityKey.removeDeprecatedPriorityKey-1)
* Delete old priority helper key.
#### Returns Promise
### removeGlobalConcurrency[](#removeGlobalConcurrency)
* removeGlobalConcurrency(): Promise[](#removeGlobalConcurrency.removeGlobalConcurrency-1)
* Remove global concurrency value.
#### Returns Promise
### removeJobScheduler[](#removeJobScheduler)
* removeJobScheduler(jobSchedulerId): Promise[](#removeJobScheduler.removeJobScheduler-1)
* Removes a job scheduler.
#### Parameters
* jobSchedulerId: string
#### Returns Promise
### removeRateLimitKey[](#removeRateLimitKey)
* removeRateLimitKey(): Promise[](#removeRateLimitKey.removeRateLimitKey-1)
* Removes rate limit key.
#### Returns Promise
### removeRepeatable[](#removeRepeatable)
* removeRepeatable(name, repeatOpts, jobId?): Promise[](#removeRepeatable.removeRepeatable-1)
* Removes a repeatable job.
Note: you need to use the exact same repeatOpts when deleting a repeatable job than when adding it.
#### Parameters
* name: [NameType](v5.Queue.html#constructor.new_Queue.NameType-1)
Job name
* repeatOpts: [RepeatOptions](../interfaces/v5.RepeatOptions.html)
* `Optional` jobId: string
#### Returns Promise
#### Deprecated
This method is deprecated and will be removed in v6. Use removeJobScheduler instead.
#### See
removeRepeatableByKey
### removeRepeatableByKey[](#removeRepeatableByKey)
* removeRepeatableByKey(key): Promise[](#removeRepeatableByKey.removeRepeatableByKey-1)
* Removes a repeatable job by its key. Note that the key is the one used to store the repeatable job metadata and not one of the job iterations themselves. You can use "getRepeatableJobs" in order to get the keys.
#### Parameters
* key: string
#### Returns Promise
#### See
getRepeatableJobs
#### Deprecated
This method is deprecated and will be removed in v6. Use removeJobScheduler instead.
### resume[](#resume)
* resume(): Promise