Versions in this module Expand all Collapse all v0 v0.1.0 Nov 25, 2026 Changes in this version + const DefaultEventsMaxLen + const DefaultMaxEvents + const ErrCodeJobBelongsToJobScheduler + const ErrCodeJobHasFailedChildren + const ErrCodeJobLockMismatch + const ErrCodeJobLockNotExist + const ErrCodeJobNotExist + const ErrCodeJobNotInState + const ErrCodeJobPendingDeps + const ErrCodeParentJobCannotBeReplaced + const ErrCodeParentJobNotExist + const ErrCodeSchedulerJobIDCollision + const ErrCodeSchedulerJobSlotsBusy + const ScriptsVersion + const Version + var AllStates = []JobState + var ErrDelayed = errors.New("bullmq: job moved to delayed") + var ErrFlowProducerClosed = errors.New("bullmq: flow producer is closed") + var ErrJobBelongsToJobScheduler = errors.New("bullmq: job belongs to a job scheduler and cannot be removed directly") + var ErrJobCancelled = errors.New("bullmq: job cancelled") + var ErrJobHasFailedChildren = errors.New("bullmq: job has failed children") + var ErrJobLockMismatch = errors.New("bullmq: lock is not owned by this client") + var ErrJobLockNotExist = errors.New("bullmq: missing job lock") + var ErrJobLocked = errors.New("bullmq: job is locked by another worker") + var ErrJobNotFound = errors.New("bullmq: missing job key") + var ErrJobNotInState = errors.New("bullmq: job is not in the expected state") + var ErrJobPendingDependencies = errors.New("bullmq: job has pending dependencies") + var ErrLegacyRepeatableJob = errors.New("bullmq: legacy repeatable job metadata is not supported") + var ErrLockLost = errors.New("bullmq: job lock lost") + var ErrNoContext = errors.New("bullmq: job has no backend") + var ErrNotSupported = errors.New("bullmq: not supported by this backend") + var ErrParentJobCannotBeReplaced = errors.New("bullmq: the parent of a job cannot be replaced") + var ErrParentJobNotExist = errors.New("bullmq: parent job does not exist") + var ErrQueueEventsClosed = errors.New("bullmq: queue events is closed") + var ErrRateLimited = errors.New("bullmq: rate limit exceeded") + var ErrSchedulerJobIDCollision = errors.New("bullmq: cannot create job scheduler iteration, job id already exists") + var ErrSchedulerJobSlotsBusy = errors.New(...) + var ErrWaiting = errors.New("bullmq: job moved to wait") + var ErrWaitingChildren = errors.New("bullmq: job moved to waiting children") + var ErrWorkerClosed = errors.New("bullmq: worker is closed") + func Bool(b bool) *bool + func Int(n int) *int + func Int64(n int64) *int64 + func IsUnrecoverable(err error) bool + func NewUnrecoverableError(format string, args ...any) error + type Backend interface + AddFlow func(ctx context.Context, entries []FlowEntry) ([]string, error) + AddJob func(ctx context.Context, job NewJob) (string, error) + AddJobScheduler func(ctx context.Context, s NewJobScheduler) (string, int64, error) + AddJobs func(ctx context.Context, jobs []NewJob) ([]string, error) + AddLog func(ctx context.Context, jobID, row string, keepLogs int64) (int64, error) + ChangeDelay func(ctx context.Context, jobID string, delay time.Duration) error + ChangePriority func(ctx context.Context, jobID string, priority int64, lifo bool) error + CleanJobsByState func(ctx context.Context, state JobState, timestamp, limit int64) ([]string, error) + ClientName func(suffix string) string + Close func() error + DeleteDeduplicationKey func(ctx context.Context, dedupID string) (bool, error) + Drain func(ctx context.Context, delayed bool) error + ExtendLock func(ctx context.Context, jobID, token string, duration time.Duration) error + ExtendLocks func(ctx context.Context, locks []JobLock, duration time.Duration) ([]string, error) + ForQueue func(name string) (Backend, error) + GetClientList func(ctx context.Context) ([]string, error) + GetCounts func(ctx context.Context, states []JobState) ([]int64, error) + GetCountsPerPriority func(ctx context.Context, priorities []int64) ([]int64, error) + GetDeduplicationJobID func(ctx context.Context, dedupID string) (string, error) + GetDelayedCount func(ctx context.Context, before int64) (int64, error) + GetDependencies func(ctx context.Context, jobID string, opts *DependenciesOptions) (*Dependencies, error) + GetDependencyCounts func(ctx context.Context, jobID string) (DependencyCounts, error) + GetIgnoredChildrenFailures func(ctx context.Context, jobID string) (map[string]string, error) + GetJob func(ctx context.Context, jobID string) (*JobRecord, error) + GetJobLogs func(ctx context.Context, jobID string, start, end int64) ([]string, int64, error) + GetJobScheduler func(ctx context.Context, schedulerID string) (*JobScheduler, error) + GetJobSchedulersCount func(ctx context.Context) (int64, error) + GetJobSchedulersRange func(ctx context.Context, start, end int64, asc bool) ([]JobSchedulerNext, error) + GetJobs func(ctx context.Context, states []JobState, start, end int64, asc bool) ([]*JobRecord, error) + GetMetrics func(ctx context.Context, state JobState, start, end int64) (*Metrics, error) + GetProcessedChildrenValues func(ctx context.Context, jobID string) (map[string]json.RawMessage, error) + GetQueueMeta func(ctx context.Context) (map[string]string, error) + GetQueueMetaField func(ctx context.Context, field string) (string, bool, error) + GetRanges func(ctx context.Context, states []JobState, start, end int64, asc bool) ([]string, error) + GetRateLimitTTL func(ctx context.Context, maxJobs int64) (int64, error) + GetState func(ctx context.Context, jobID string) (JobState, error) + IsJobScheduler func(ctx context.Context, id string) (bool, error) + IsMaxed func(ctx context.Context) (bool, error) + IsTransientError func(err error) bool + LastEventID func(ctx context.Context) (string, error) + MoveJobFromActiveToWait func(ctx context.Context, jobID, token string) (time.Duration, error) + MoveStalledJobsToWait func(ctx context.Context, opts StalledOptions) ([]string, error) + MoveToActive func(ctx context.Context, opts MoveToActiveOptions) (*FetchResult, error) + MoveToCompleted func(ctx context.Context, jobID string, returnValue []byte, opts FinishOptions) (*FinishResult, error) + MoveToDelayed func(ctx context.Context, jobID, token string, delay time.Duration, ...) (*FetchResult, error) + MoveToFailed func(ctx context.Context, jobID string, failure FailureInfo, opts FinishOptions) (*FinishResult, error) + MoveToWaitingChildren func(ctx context.Context, jobID, token string, child *ParentKeys) (bool, error) + Obliterate func(ctx context.Context, force bool, count int64) (int64, error) + Pause func(ctx context.Context, paused bool) error + Promote func(ctx context.Context, jobID string) error + PromoteJobs func(ctx context.Context, count int64) (int64, error) + PublishEvent func(ctx context.Context, event string, fields map[string]string, maxEvents int64) (string, error) + QualifiedName func() string + QueueName func() string + ReadEvents func(ctx context.Context, lastID string, block time.Duration) ([]QueueEvent, error) + Remove func(ctx context.Context, jobID string, removeChildren bool) (bool, error) + RemoveChildDependency func(ctx context.Context, jobID, parentKey string) (bool, error) + RemoveDeduplicationKey func(ctx context.Context, dedupID, jobID string) (bool, error) + RemoveJobScheduler func(ctx context.Context, schedulerID string) (bool, error) + RemoveQueueMetaFields func(ctx context.Context, fields ...string) error + RemoveUnprocessedChildren func(ctx context.Context, jobID string) error + ResolveParent func(parent *ParentOptions) (*ParentKeys, string, error) + RetryFinishedJob func(ctx context.Context, jobID string, state JobState, lifo bool, ...) error + RetryFinishedJobs func(ctx context.Context, state JobState, count, timestamp int64) (int64, error) + RetryJob func(ctx context.Context, jobID, token string, lifo bool, failure *FailureInfo) error + SetName func(ctx context.Context, name string) error + SetQueueMeta func(ctx context.Context, values map[string]any) error + SetRateLimit func(ctx context.Context, ttl time.Duration) error + TrimEvents func(ctx context.Context, maxLength int64) (int64, error) + UpdateData func(ctx context.Context, jobID string, data []byte) error + UpdateJobSchedulerNextMillis func(ctx context.Context, schedulerID string, nextMillis int64, templateData []byte, ...) (string, error) + UpdateProgress func(ctx context.Context, jobID string, progress Progress) error + WaitForJob func(ctx context.Context, timeout time.Duration) (WaitResult, error) + type BackendFactory func(name string, opts BackendOptions) (Backend, error) + type BackendOptions struct + BlockTimeout time.Duration + ClientNameSuffix string + QueueMeta map[string]any + WithBlockingConnection bool + type Backoff struct + Delay int64 + Jitter float64 + Type BackoffType + type BackoffType string + const BackoffExponential + const BackoffFixed + type ConfigError struct + Message string + func (e *ConfigError) Error() string + type DeduplicationOptions struct + Extend bool + ID string + KeepLastIfActive bool + Replace bool + Reschedule bool + TTL int64 + type Dependencies struct + Failed []string + Ignored map[string]string + NextFailedCursor uint64 + NextIgnoredCursor uint64 + NextProcessedCursor uint64 + NextUnprocessedCursor uint64 + Processed map[string]json.RawMessage + Unprocessed []string + type DependenciesOptions struct + Failed *DependencyPage + Ignored *DependencyPage + Processed *DependencyPage + Unprocessed *DependencyPage + type DependencyCounts struct + Failed int64 + Ignored int64 + Processed int64 + Unprocessed int64 + type DependencyPage struct + Count int64 + Cursor uint64 + type Event struct + Err error + Job *Job + JobIDs []string + Result any + Type EventType + type EventType string + const EventActive + const EventClosed + const EventCompleted + const EventDrained + const EventError + const EventFailed + const EventLockRenewalFailed + const EventLocksRenewed + const EventPaused + const EventProgress + const EventResumed + const EventStalled + type FailureInfo struct + Reason string + Stacktrace []string + type FetchResult struct + Job *JobRecord + NextDelayedAt int64 + RateLimitDelay time.Duration + type FinishOptions struct + FetchNext bool + JobOpts *JobOptions + KeepJobs *RemoveOnFinish + Limiter *RateLimiter + LockDuration time.Duration + Metrics *MetricsOptions + Token string + WorkerName string + type FinishResult struct + FinishedOn int64 + Next *FetchResult + type FlowEntry struct + Job NewJob + JobID string + QueueName string + WaitingChildren bool + type FlowGetOptions struct + Depth int + ID string + MaxChildren int64 + QueueName string + type FlowJob struct + Children []FlowJob + Data any + Name string + Opts *JobOptions + QueueName string + type FlowOpts struct + QueuesOptions map[string]FlowQueueOptions + type FlowProducer struct + func NewFlowProducer(opts *FlowProducerOptions) (*FlowProducer, error) + func (fp *FlowProducer) Add(ctx context.Context, flow FlowJob, opts *FlowOpts) (*JobNode, error) + func (fp *FlowProducer) AddBulk(ctx context.Context, flows []FlowJob) ([]*JobNode, error) + func (fp *FlowProducer) Backend() Backend + func (fp *FlowProducer) Close() error + func (fp *FlowProducer) GetFlow(ctx context.Context, opts FlowGetOptions) (*JobNode, error) + type FlowProducerOptions struct + Backend BackendFactory + type FlowQueueOptions struct + DefaultJobOptions *JobOptions + type Job struct + AttemptsMade int64 + AttemptsStarted int64 + Data json.RawMessage + DeduplicationID string + DeferredFailure string + Delay int64 + FailedReason string + FinishedOn int64 + ID string + Name string + Opts *JobOptions + Parent *ParentKeys + ParentKey string + Priority int64 + ProcessedBy string + ProcessedOn int64 + Progress Progress + QueueName string + RepeatJobKey string + ReturnValue json.RawMessage + Stacktrace []string + StalledCounter int64 + Timestamp int64 + func (j *Job) ChangeDelay(ctx context.Context, delay time.Duration) error + func (j *Job) ChangePriority(ctx context.Context, priority int64, lifo bool) error + func (j *Job) ChildrenValues(ctx context.Context) (map[string]json.RawMessage, error) + func (j *Job) DecodeChildrenValues(ctx context.Context, out any) error + func (j *Job) DecodeData(out any) error + func (j *Job) DecodeReturnValue(out any) error + func (j *Job) Dependencies(ctx context.Context, opts *DependenciesOptions) (*Dependencies, error) + func (j *Job) DependenciesCount(ctx context.Context) (DependencyCounts, error) + func (j *Job) Discard() + func (j *Job) Discarded() bool + func (j *Job) ExtendLock(ctx context.Context, duration time.Duration) error + func (j *Job) FailedChildrenValues(ctx context.Context) (map[string]string, error) + func (j *Job) IgnoredChildrenFailures(ctx context.Context) (map[string]string, error) + func (j *Job) IsCompleted(ctx context.Context) (bool, error) + func (j *Job) IsFailed(ctx context.Context) (bool, error) + func (j *Job) Log(ctx context.Context, message string) (int64, error) + func (j *Job) Logs(ctx context.Context, start, end int64) ([]string, int64, error) + func (j *Job) MoveToCompleted(ctx context.Context, result any, token string, fetchNext bool) (*Job, error) + func (j *Job) MoveToDelayed(ctx context.Context, delay time.Duration) error + func (j *Job) MoveToFailed(ctx context.Context, cause error, token string, fetchNext bool) (*Job, error) + func (j *Job) MoveToWait(ctx context.Context) error + func (j *Job) MoveToWaitingChildren(ctx context.Context, child *ParentKeys) (bool, error) + func (j *Job) Promote(ctx context.Context) error + func (j *Job) Remove(ctx context.Context, removeChildren bool) error + func (j *Job) RemoveChildDependency(ctx context.Context) (bool, error) + func (j *Job) RemoveDeduplicationKey(ctx context.Context) (bool, error) + func (j *Job) RemoveUnprocessedChildren(ctx context.Context) error + func (j *Job) Retry(ctx context.Context, state JobState, opts *RetryOptions) error + func (j *Job) State(ctx context.Context) (JobState, error) + func (j *Job) Token() string + func (j *Job) UpdateData(ctx context.Context, data any) error + func (j *Job) UpdateProgress(ctx context.Context, progress any) error + type JobCounts map[JobState]int64 + type JobLock struct + JobID string + Token string + type JobNode struct + Children []*JobNode + Job *Job + type JobOptions struct + Attempts *int64 + Backoff *Backoff + ContinueParentOnFailure *bool + Deduplication *DeduplicationOptions + Delay *int64 + FailParentOnFailure *bool + IgnoreDependencyOnFailure *bool + JobID string + KeepLogs *int64 + LIFO *bool + Parent *ParentOptions + PrevMillis int64 + Priority *int64 + RemoveDependencyOnFailure *bool + RemoveOnComplete *RemoveOnFinish + RemoveOnFail *RemoveOnFinish + Repeat *RepeatOptions + RepeatJobKey string + SizeLimit *int64 + StackTraceLimit *int64 + Timestamp int64 + func (opts *JobOptions) UnmarshalJSON(data []byte) error + type JobRecord struct + AttemptsMade int64 + AttemptsStarted int64 + Data json.RawMessage + DeduplicationID string + DeferredFailure string + Delay int64 + FailedReason string + FinishedOn int64 + ID string + Name string + Opts *JobOptions + Parent *ParentKeys + ParentKey string + Priority int64 + ProcessedBy string + ProcessedOn int64 + Progress Progress + RepeatJobKey string + ReturnValue json.RawMessage + Stacktrace []string + StalledCounter int64 + Timestamp int64 + type JobScheduler struct + EndDate int64 + Every int64 + ID string + IterationCount int64 + Limit int64 + Name string + Next int64 + Offset int64 + Pattern string + StartDate int64 + Template *JobSchedulerTemplate + Tz string + type JobSchedulerNext struct + ID string + Next int64 + type JobSchedulerTemplate struct + Data json.RawMessage + Opts *JobOptions + type JobSpec struct + Data any + Name string + Opts *JobOptions + type JobState string + const StateActive + const StateCompleted + const StateDelayed + const StateFailed + const StatePaused + const StatePrioritized + const StateUnknown + const StateWaiting + const StateWaitingChildren + type JobTemplate struct + Data any + Name string + Opts *JobOptions + type Metrics struct + Count int64 + Data []int64 + NumPoints int64 + PrevCount int64 + PrevTS int64 + type MetricsOptions struct + MaxDataPoints int64 + type MoveToActiveOptions struct + Limiter *RateLimiter + LockDuration time.Duration + Token string + WorkerName string + type MoveToDelayedOptions struct + Failure *FailureInfo + FetchNext bool + Limiter *RateLimiter + LockDuration time.Duration + SkipAttempt bool + WorkerName string + type NewJob struct + Data []byte + Name string + Opts *JobOptions + type NewJobScheduler struct + EndDate int64 + Every int64 + ID string + JobOpts *JobOptions + Limit int64 + Name string + NextMillis int64 + Offset int64 + Pattern string + ProducerID string + StartDate int64 + TemplateData []byte + TemplateOpts *JobOptions + Tz string + type ObliterateOptions struct + Count int64 + Force bool + type ParentKeys struct + ID string + QueueKey string + type ParentOptions struct + ID string + Queue string + type Processor func(ctx context.Context, job *Job) (any, error) + type Progress struct + func JSONProgress(v any) (Progress, error) + func NumberProgress(v float64) (Progress, error) + func (p *Progress) UnmarshalJSON(data []byte) error + func (p Progress) Decode(out any) error + func (p Progress) MarshalJSON() ([]byte, error) + func (p Progress) Number() (float64, bool) + func (p Progress) Raw() string + type Queue struct + func NewQueue(name string, opts *QueueOptions) (*Queue, error) + func (q *Queue) Add(ctx context.Context, name string, data any, opts *JobOptions) (*Job, error) + func (q *Queue) AddBulk(ctx context.Context, specs []JobSpec) ([]*Job, error) + func (q *Queue) Backend() Backend + func (q *Queue) Clean(ctx context.Context, grace time.Duration, limit int64, state JobState) ([]string, error) + func (q *Queue) Close() error + func (q *Queue) Count(ctx context.Context) (int64, error) + func (q *Queue) CountsPerPriority(ctx context.Context, priorities ...int64) (map[int64]int64, error) + func (q *Queue) DeduplicationJobID(ctx context.Context, dedupID string) (string, error) + func (q *Queue) DelayedCount(ctx context.Context, before time.Time) (int64, error) + func (q *Queue) Drain(ctx context.Context, delayed bool) error + func (q *Queue) GlobalConcurrency(ctx context.Context) (*int64, error) + func (q *Queue) GlobalRateLimit(ctx context.Context) (*RateLimiter, error) + func (q *Queue) IsMaxed(ctx context.Context) (bool, error) + func (q *Queue) IsPaused(ctx context.Context) (bool, error) + func (q *Queue) Job(ctx context.Context, jobID string) (*Job, error) + func (q *Queue) JobCounts(ctx context.Context, states ...JobState) (JobCounts, error) + func (q *Queue) JobIDs(ctx context.Context, start, end int64, asc bool, states ...JobState) ([]string, error) + func (q *Queue) JobScheduler(ctx context.Context, id string) (*JobScheduler, error) + func (q *Queue) JobSchedulers(ctx context.Context, start, end int64, asc bool) ([]*JobScheduler, error) + func (q *Queue) JobSchedulersCount(ctx context.Context) (int64, error) + func (q *Queue) JobState(ctx context.Context, jobID string) (JobState, error) + func (q *Queue) Jobs(ctx context.Context, start, end int64, asc bool, states ...JobState) ([]*Job, error) + func (q *Queue) Meta(ctx context.Context) (*QueueMeta, error) + func (q *Queue) Metrics(ctx context.Context, state JobState, start, end int64) (*Metrics, error) + func (q *Queue) Name() string + func (q *Queue) Obliterate(ctx context.Context, opts *ObliterateOptions) error + func (q *Queue) Pause(ctx context.Context) error + func (q *Queue) PromoteJobs(ctx context.Context, count int64) error + func (q *Queue) RateLimitTTL(ctx context.Context, maxJobs int64) (int64, error) + func (q *Queue) Remove(ctx context.Context, jobID string, removeChildren bool) (bool, error) + func (q *Queue) RemoveDeduplicationKey(ctx context.Context, dedupID string) (bool, error) + func (q *Queue) RemoveGlobalConcurrency(ctx context.Context) error + func (q *Queue) RemoveGlobalRateLimit(ctx context.Context) error + func (q *Queue) RemoveJobScheduler(ctx context.Context, id string) (bool, error) + func (q *Queue) Resume(ctx context.Context) error + func (q *Queue) RetryJobs(ctx context.Context, opts *RetryJobsOptions) error + func (q *Queue) SetGlobalConcurrency(ctx context.Context, max int64) error + func (q *Queue) SetGlobalRateLimit(ctx context.Context, max int64, duration time.Duration) error + func (q *Queue) TrimEvents(ctx context.Context, maxLength int64) (int64, error) + func (q *Queue) UpsertJobScheduler(ctx context.Context, id string, repeat RepeatOptions, template *JobTemplate) (*Job, error) + func (q *Queue) Version(ctx context.Context) (string, error) + func (q *Queue) Workers(ctx context.Context) ([]WorkerInfo, error) + type QueueEvent struct + Data map[string]string + Event string + ID string + JobID string + func (e QueueEvent) DecodeProgress(out any) error + func (e QueueEvent) DecodeReturnValue(out any) error + func (e QueueEvent) DelayedUntil() (t time.Time, ok bool) + func (e QueueEvent) FailedReason() string + func (e QueueEvent) Progress() (Progress, error) + func (e QueueEvent) ReturnValue() string + type QueueEvents struct + func NewQueueEvents(queueName string, opts *QueueEventsOptions) (*QueueEvents, error) + func (qe *QueueEvents) Backend() Backend + func (qe *QueueEvents) Close() error + func (qe *QueueEvents) Errors() <-chan error + func (qe *QueueEvents) Events() <-chan QueueEvent + func (qe *QueueEvents) Run(ctx context.Context) error + type QueueEventsOptions struct + Backend BackendFactory + BlockingTimeout time.Duration + BufferSize int + LastEventID string + type QueueEventsProducer struct + func NewQueueEventsProducer(name string, opts *QueueEventsProducerOptions) (*QueueEventsProducer, error) + func (p *QueueEventsProducer) Backend() Backend + func (p *QueueEventsProducer) Close() error + func (p *QueueEventsProducer) PublishEvent(ctx context.Context, eventName string, fields map[string]any, maxEvents int64) (string, error) + type QueueEventsProducerOptions struct + Backend BackendFactory + type QueueMeta struct + Concurrency *int64 + Duration *time.Duration + Max *int64 + MaxLenEvents *int64 + Paused bool + Version string + type QueueOptions struct + Backend BackendFactory + DefaultJobOptions *JobOptions + EventsMaxLen int64 + RepeatStrategy RepeatStrategy + SkipMetasUpdate bool + type RateLimiter struct + Duration time.Duration + Max int64 + type RemoveOnFinish struct + Age *int64 + Count *int64 + Limit *int64 + func KeepAge(seconds int64) *RemoveOnFinish + func KeepCount(n int64) *RemoveOnFinish + func RemoveAll() *RemoveOnFinish + func (r *RemoveOnFinish) IsRemoveAll() bool + func (r *RemoveOnFinish) UnmarshalJSON(data []byte) error + func (r RemoveOnFinish) MarshalJSON() ([]byte, error) + type RepeatOptions struct + Count int64 + EndDate int64 + Every int64 + Immediately bool + Limit int64 + Offset int64 + Pattern string + StartDate int64 + Tz string + func (r *RepeatOptions) UnmarshalJSON(data []byte) error + type RepeatStrategy func(millis int64, opts RepeatOptions, jobName string) (int64, error) + type RetryJobsOptions struct + Before time.Time + Count int64 + State JobState + type RetryOptions struct + ResetAttemptsMade bool + ResetAttemptsStarted bool + type ScriptError struct + Code int64 + Script string + func (e *ScriptError) Error() string + func (e *ScriptError) Unwrap() error + type StalledOptions struct + Interval time.Duration + MaxStalledCount int + type UnrecoverableError struct + Message string + func (e *UnrecoverableError) Error() string + type WaitResult struct + NextDelayedAt int64 + Woken bool + type Worker struct + func NewWorker(queueName string, proc Processor, opts *WorkerOptions) (*Worker, error) + func (w *Worker) ActiveCount() int + func (w *Worker) Backend() Backend + func (w *Worker) CancelAllJobs(reason string) + func (w *Worker) CancelJob(jobID, reason string) bool + func (w *Worker) Close() error + func (w *Worker) Concurrency() int + func (w *Worker) DroppedEvents() uint64 + func (w *Worker) Events() <-chan Event + func (w *Worker) GetNextJob(ctx context.Context, token string, block bool) (*Job, error) + func (w *Worker) ID() string + func (w *Worker) IsPaused() bool + func (w *Worker) Name() string + func (w *Worker) Pause(ctx context.Context, doNotWaitActive bool) error + func (w *Worker) RateLimit(ctx context.Context, d time.Duration) error + func (w *Worker) Resume() + func (w *Worker) Run(ctx context.Context) error + func (w *Worker) SetConcurrency(n int) error + func (w *Worker) StartStalledCheck() error + type WorkerInfo struct + Fields map[string]string + Name string + type WorkerOptions struct + Backend BackendFactory + BackoffStrategy func(attemptsMade int64, backoffType BackoffType, err error, job *Job) int64 + Concurrency int + DrainDelay time.Duration + Limiter *RateLimiter + LockDuration time.Duration + LockRenewTime time.Duration + MaxStalledCount *int + MaxStartedAttempts int + MaximumRateLimitDelay time.Duration + Metrics *MetricsOptions + Name string + OnError func(err error) + OnEvent func(Event) + RemoveOnComplete *RemoveOnFinish + RemoveOnFail *RemoveOnFinish + RepeatStrategy RepeatStrategy + SkipLockRenewal bool + SkipStalledCheck bool + StalledInterval time.Duration