Versions in this module Expand all Collapse all v0 v0.1.0 Nov 21, 2026 Changes in this version + const ExitError + const ExitMemoryLimit + const ExitSuccess + var ErrBatchNotFound = &Error + var ErrClosureNotSerializable = &Error + var ErrConnectionNotFound = &Error + var ErrFailedJobNotFound = &Error + var ErrJobNotRegistered = &Error + var ErrJobTimeout = &Error + var ErrMaxAttemptsExceeded = &Error + var ErrMaxExceptionsExceeded = &Error + var ErrModelNotFound = &Error + var ErrNotInJob = &Error + func BindRuntime(ctx context.Context, rt *Runtime) context.Context + func DisplayNameOf(job any) string + func ErrorFrom(ctx context.Context) error + func IsCode(err error, code Code) bool + func Listen[E any](m *Manager, fn func(ctx context.Context, e E)) (off func()) + func NameOf(job any) string + func NewFakeBatch(id, name string) (*Batch, *BatchRecorder) + func NewUUID() string + func Register(prototype Job) + func RegisterAs(name string, prototype Job) + func RegisterClosure(name string, fn func(ctx context.Context, args json.RawMessage) error) + func RegisterFactory(name string, factory Factory) + func Registered() []string + func RouteInterface[I any](m *Manager, connection, queue string) + func WithDeferred(ctx context.Context) (context.Context, func()) + type AgeReporter interface + OldestPending func(ctx context.Context, queue string) (time.Time, error) + type Batch struct + CancelledAt *time.Time + CreatedAt time.Time + FailedJobIDs []string + FailedJobs int + FinishedAt *time.Time + ID string + Name string + Options BatchOptions + PendingJobs int + TotalJobs int + func BatchFrom(ctx context.Context) *Batch + func (b *Batch) Add(ctx context.Context, items ...any) error + func (b *Batch) Cancel(ctx context.Context) error + func (b *Batch) Cancelled() bool + func (b *Batch) Delete(ctx context.Context) error + func (b *Batch) Finished() bool + func (b *Batch) Fresh(ctx context.Context) (*Batch, error) + func (b *Batch) HasFailures() bool + func (b *Batch) HasPendingJobs() bool + func (b *Batch) MarshalJSON() ([]byte, error) + func (b *Batch) ProcessedJobs() int + func (b *Batch) Progress() int + type BatchDispatched struct + Batch *Batch + type BatchOptions struct + AllowFailures bool + Catch []json.RawMessage + Chain []json.RawMessage + ChainCatch []json.RawMessage + ChainConnection string + ChainQueue string + Connection string + Finally []json.RawMessage + Progress []json.RawMessage + Queue string + Then []json.RawMessage + type BatchRecorder struct + Added []any + Cancelled bool + Deleted bool + type BatchStore interface + Cancel func(ctx context.Context, id string, at time.Time) error + Delete func(ctx context.Context, id string) error + Find func(ctx context.Context, id string) (*Batch, error) + IncrementTotalJobs func(ctx context.Context, id string, n int) error + List func(ctx context.Context, limit int, before string) ([]*Batch, error) + MarkFinished func(ctx context.Context, id string, at time.Time) error + Prune func(ctx context.Context, before time.Time) (int64, error) + PruneCancelled func(ctx context.Context, before time.Time) (int64, error) + PruneUnfinished func(ctx context.Context, before time.Time) (int64, error) + RecordFailure func(ctx context.Context, id, jobID string) (*Batch, error) + RecordSuccess func(ctx context.Context, id, jobID string) (*Batch, error) + Store func(ctx context.Context, b *Batch) error + type BulkPusher interface + PushBulk func(ctx context.Context, ms []Message) ([]string, error) + type Cache interface + Add func(ctx context.Context, key, value string, ttl time.Duration) (bool, error) + Forget func(ctx context.Context, key string) error + ForgetIf func(ctx context.Context, key, value string) (bool, error) + Get func(ctx context.Context, key string) (value string, ok bool, err error) + Increment func(ctx context.Context, key string, by int64, ttl time.Duration) (int64, error) + Put func(ctx context.Context, key, value string, ttl time.Duration) error + type Closer interface + Close func() error + type Code string + const BatchFailed + const BatchNotFound + const CacheFailed + const ClosureNotSerializable + const ConnectionNotFound + const DriverFailed + const FailedJobNotFound + const FailoverExhausted + const InvalidConfig + const JobFailedManually + const JobNotRegistered + const JobTimeout + const MaxAttemptsExceeded + const MaxExceptionsExceeded + const ModelNotFound + const NotInJob + const PayloadDecryptFailed + const PayloadInvalid + const PopFailed + const PushFailed + const StoreFailed + func CodeOf(err error) Code + type Config struct + Batches BatchStore + Cache Cache + Connections map[string]Connection + Default string + Failed FailedJobStore + Key []byte + Logger *slog.Logger + Now func() time.Time + PreviousKeys [][]byte + type Connection struct + AfterCommit bool + Driver Driver + Queue string + type CountsCrashes struct + func (CountsCrashes) CountCrashesAsExceptions() bool + type DeletesMissingModels struct + func (DeletesMissingModels) DeleteWhenMissingModels() bool + type Dispatched struct + AfterResponse bool + Chain []any + Connection string + Delay time.Duration + Job Job + Queue string + Sync bool + type Driver interface + Clear func(ctx context.Context, queue string) (int64, error) + Pop func(ctx context.Context, queue string) (Reserved, error) + Push func(ctx context.Context, m Message) (id string, err error) + Size func(ctx context.Context, queue string) (int64, error) + func BackgroundDriver() Driver + func DeferredDriver() Driver + func FailoverDriver(connections ...string) Driver + func Null() Driver + func SyncDriver() Driver + type Encrypted struct + func (Encrypted) ShouldBeEncrypted() + type Error struct + Code Code + Err error + Message string + func Newf(code Code, format string, args ...any) *Error + func Wrap(code Code, cause error, format string, args ...any) *Error + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Unwrap() error + type Factory func() Job + type FailedJob struct + Connection string + Exception string + FailedAt time.Time + ID string + Payload []byte + Queue string + type FailedJobStore interface + All func(ctx context.Context) ([]FailedJob, error) + Find func(ctx context.Context, id string) (*FailedJob, error) + Flush func(ctx context.Context, olderThan time.Duration) (int64, error) + Forget func(ctx context.Context, id string) (bool, error) + IDs func(ctx context.Context, queue string) ([]string, error) + Log func(ctx context.Context, f FailedJob) error + Prune func(ctx context.Context, before time.Time) (int64, error) + type FailsOnTimeout struct + func (FailsOnTimeout) FailOnTimeout() bool + type Hits struct + Cache Cache + Now func() time.Time + func (h Hits) AvailableIn(ctx context.Context, key string) (time.Duration, error) + func (h Hits) Clear(ctx context.Context, key string) error + func (h Hits) Hit(ctx context.Context, key string, decay time.Duration) (int64, error) + func (h Hits) TooManyAttempts(ctx context.Context, key string, max int) (bool, error) + type InProcess interface + InProcess func() bool + type Interceptor interface + InterceptBatch func(ctx context.Context, b *PendingBatch) (*Batch, bool) + InterceptDispatch func(ctx context.Context, d Dispatched) bool + type Interruptible interface + Interrupted func(sig os.Signal) + type Job interface + Handle func(ctx context.Context) error + func Call(name string, args any) Job + func Closure(fn func(ctx context.Context) error) Job + type JobAttempted struct + Connection string + ExceptionOccurred bool + Job *Runtime + type JobDebounced struct + Connection string + Job *Runtime + type JobExceptionOccurred struct + Connection string + Err error + Job *Runtime + type JobFailed struct + Connection string + Err error + Job *Runtime + type JobPopped struct + Connection string + Job *Runtime + type JobPopping struct + Connection string + type JobProcessed struct + Connection string + Job *Runtime + type JobProcessing struct + Connection string + Job *Runtime + type JobQueued struct + Connection string + Delay time.Duration + ID string + Job Job + Payload *Payload + Queue string + type JobQueueing struct + Connection string + Delay time.Duration + Job Job + Payload *Payload + Queue string + type JobReleasedAfterException struct + Connection string + Delay time.Duration + Job *Runtime + type JobRetryRequested struct + Failed FailedJob + type JobTimedOut struct + Connection string + Job *Runtime + type Limit struct + Decay time.Duration + Key string + MaxAttempts int + Unlimited bool + func NoLimit() Limit + func PerDay(n int) Limit + func PerHour(n int) Limit + func PerMinute(n int) Limit + func PerMinutes(minutes, n int) Limit + func PerSecond(n int) Limit + func (l Limit) By(key string) Limit + type Lock struct + func NewLock(c Cache, key, owner string, ttl time.Duration) *Lock + func (l *Lock) ForceRelease(ctx context.Context) error + func (l *Lock) Get(ctx context.Context) (bool, error) + func (l *Lock) Owner() string + func (l *Lock) Release(ctx context.Context) (bool, error) + type Looping struct + Connection string + Queues []string + type Manager struct + func New(cfg Config) (*Manager, error) + func (m *Manager) After(fn func(ctx context.Context, e JobProcessed)) func() + func (m *Manager) Batch(items ...any) *PendingBatch + func (m *Manager) BatchStore() BatchStore + func (m *Manager) Batches(ctx context.Context, limit int, before string) ([]*Batch, error) + func (m *Manager) Before(fn func(ctx context.Context, e JobProcessing)) func() + func (m *Manager) Bulk(ctx context.Context, jobs ...Job) error + func (m *Manager) Cache() Cache + func (m *Manager) Chain(jobs ...any) *PendingChain + func (m *Manager) Clear(ctx context.Context, connection, queue string) (int64, error) + func (m *Manager) Close() error + func (m *Manager) Connection(name string) (Connection, error) + func (m *Manager) Connections() []string + func (m *Manager) DefaultConnection() string + func (m *Manager) Dispatch(job Job) *PendingDispatch + func (m *Manager) DispatchAfterResponse(ctx context.Context, job Job) error + func (m *Manager) DispatchIf(ctx context.Context, cond bool, job Job) (string, error) + func (m *Manager) DispatchSync(ctx context.Context, job Job) error + func (m *Manager) DispatchUnless(ctx context.Context, cond bool, job Job) (string, error) + func (m *Manager) DontRetry(targets ...error) + func (m *Manager) DontRetryWhen(fn func(err error) bool) + func (m *Manager) FailedJobs() FailedJobStore + func (m *Manager) Failing(fn func(ctx context.Context, e JobFailed)) func() + func (m *Manager) FindBatch(ctx context.Context, id string) (*Batch, error) + func (m *Manager) Forward(queue, toQueue, connection string) + func (m *Manager) Intercept(i Interceptor) (restore func()) + func (m *Manager) IsPaused(ctx context.Context, connection, queue string) (bool, error) + func (m *Manager) Limiter(name string) (func(job Job) []Limit, bool) + func (m *Manager) Logger() *slog.Logger + func (m *Manager) Looping(fn func(ctx context.Context, e Looping) bool) func() + func (m *Manager) Middleware(next http.Handler) http.Handler + func (m *Manager) Monitor(ctx context.Context, targets []string, max int64) ([]QueueStatus, error) + func (m *Manager) Now() time.Time + func (m *Manager) Pause(ctx context.Context, connection, queue string, ttl time.Duration) error + func (m *Manager) PauseAll(ctx context.Context, ttl time.Duration) error + func (m *Manager) RateLimiter(name string, fn func(job Job) []Limit) + func (m *Manager) Restart(ctx context.Context) error + func (m *Manager) Resume(ctx context.Context, connection, queue string) error + func (m *Manager) ResumeAll(ctx context.Context) error + func (m *Manager) RetryBatch(ctx context.Context, id string) error + func (m *Manager) RetryFailed(ctx context.Context, ids ...string) error + func (m *Manager) RetryFailedQueue(ctx context.Context, queue string) error + func (m *Manager) Route(prototype Job, connection, queue string) + func (m *Manager) RouteMatching(match func(Job) bool, connection, queue string) + func (m *Manager) Size(ctx context.Context, connection, queue string) (int64, error) + func (m *Manager) Transaction(ctx context.Context, fn func(ctx context.Context) error) error + func (m *Manager) Wait() + func (m *Manager) WithoutInterruptionPolling() + func (m *Manager) Work(ctx context.Context, o WorkerOptions) (int, error) + type MemoryBatchStore struct + func NewMemoryBatchStore() *MemoryBatchStore + func (s *MemoryBatchStore) Cancel(_ context.Context, id string, at time.Time) error + func (s *MemoryBatchStore) Delete(_ context.Context, id string) error + func (s *MemoryBatchStore) Find(_ context.Context, id string) (*Batch, error) + func (s *MemoryBatchStore) IncrementTotalJobs(_ context.Context, id string, n int) error + func (s *MemoryBatchStore) List(_ context.Context, limit int, before string) ([]*Batch, error) + func (s *MemoryBatchStore) MarkFinished(_ context.Context, id string, at time.Time) error + func (s *MemoryBatchStore) Prune(_ context.Context, before time.Time) (int64, error) + func (s *MemoryBatchStore) PruneCancelled(_ context.Context, before time.Time) (int64, error) + func (s *MemoryBatchStore) PruneUnfinished(_ context.Context, before time.Time) (int64, error) + func (s *MemoryBatchStore) RecordFailure(_ context.Context, id, jobID string) (*Batch, error) + func (s *MemoryBatchStore) RecordSuccess(_ context.Context, id, jobID string) (*Batch, error) + func (s *MemoryBatchStore) Store(_ context.Context, b *Batch) error + type MemoryCache struct + func NewMemoryCache() *MemoryCache + func (c *MemoryCache) Add(_ context.Context, key, value string, ttl time.Duration) (bool, error) + func (c *MemoryCache) Forget(_ context.Context, key string) error + func (c *MemoryCache) ForgetIf(_ context.Context, key, value string) (bool, error) + func (c *MemoryCache) Get(_ context.Context, key string) (string, bool, error) + func (c *MemoryCache) Increment(_ context.Context, key string, by int64, ttl time.Duration) (int64, error) + func (c *MemoryCache) Put(_ context.Context, key, value string, ttl time.Duration) error + func (c *MemoryCache) SetClock(now func() time.Time) + type MemoryDriver struct + func NewMemoryDriver(retryAfter time.Duration) *MemoryDriver + func (d *MemoryDriver) Clear(_ context.Context, queue string) (int64, error) + func (d *MemoryDriver) DelayedSize(_ context.Context, queue string) (int64, error) + func (d *MemoryDriver) InProcess() bool + func (d *MemoryDriver) OldestPending(_ context.Context, queue string) (time.Time, error) + func (d *MemoryDriver) Payloads(queue string) [][]byte + func (d *MemoryDriver) PendingSize(_ context.Context, queue string) (int64, error) + func (d *MemoryDriver) Pop(_ context.Context, queue string) (Reserved, error) + func (d *MemoryDriver) Push(_ context.Context, m Message) (string, error) + func (d *MemoryDriver) PushBulk(ctx context.Context, ms []Message) ([]string, error) + func (d *MemoryDriver) ReservedSize(_ context.Context, queue string) (int64, error) + func (d *MemoryDriver) SetClock(now func() time.Time) + func (d *MemoryDriver) Size(_ context.Context, queue string) (int64, error) + type MemoryFailedJobStore struct + func NewMemoryFailedJobStore() *MemoryFailedJobStore + func (s *MemoryFailedJobStore) All(context.Context) ([]FailedJob, error) + func (s *MemoryFailedJobStore) Find(_ context.Context, id string) (*FailedJob, error) + func (s *MemoryFailedJobStore) Flush(_ context.Context, olderThan time.Duration) (int64, error) + func (s *MemoryFailedJobStore) Forget(_ context.Context, id string) (bool, error) + func (s *MemoryFailedJobStore) IDs(_ context.Context, queue string) ([]string, error) + func (s *MemoryFailedJobStore) Log(_ context.Context, f FailedJob) error + func (s *MemoryFailedJobStore) Prune(_ context.Context, before time.Time) (int64, error) + type Message struct + DeduplicationID string + Delay time.Duration + Group string + ID string + Payload []byte + Queue string + type Middleware interface + Handle func(ctx context.Context, job Job, next Next) error + type MiddlewareFunc func(ctx context.Context, job Job, next Next) error + func (f MiddlewareFunc) Handle(ctx context.Context, job Job, next Next) error + type Next func(ctx context.Context) error + type NullFailedJobStore struct + func (NullFailedJobStore) All(context.Context) ([]FailedJob, error) + func (NullFailedJobStore) Find(_ context.Context, id string) (*FailedJob, error) + func (NullFailedJobStore) Flush(context.Context, time.Duration) (int64, error) + func (NullFailedJobStore) Forget(context.Context, string) (bool, error) + func (NullFailedJobStore) IDs(context.Context, string) ([]string, error) + func (NullFailedJobStore) Log(context.Context, FailedJob) error + func (NullFailedJobStore) Prune(context.Context, time.Time) (int64, error) + type Payload struct + Backoff []int64 + BatchID string + Chain []json.RawMessage + ChainCatch []json.RawMessage + ChainConnection string + ChainQueue string + Connection string + CountCrashes bool + CreatedAt int64 + Data json.RawMessage + DebounceKey string + DedupID string + Delay int64 + DeleteMissing bool + DisplayName string + FailOnTimeout bool + Group string + Job string + MaxExceptions int + MaxTries *int + Queue string + RetryUntil int64 + Secret string + Timeout int64 + UUID string + UniqueKey string + UniqueUntilProcessing bool + func DecodePayload(raw []byte) (*Payload, error) + type PendingBatch struct + func (p *PendingBatch) AllowFailures(allow ...bool) *PendingBatch + func (p *PendingBatch) AllowsFailures() bool + func (p *PendingBatch) BatchName() string + func (p *PendingBatch) Before(fn func(ctx context.Context, b *Batch)) *PendingBatch + func (p *PendingBatch) Catch(fn func(ctx context.Context, b *Batch, err error)) *PendingBatch + func (p *PendingBatch) CatchJob(job Job) *PendingBatch + func (p *PendingBatch) Dispatch(ctx context.Context) (*Batch, error) + func (p *PendingBatch) DispatchIf(ctx context.Context, cond bool) (*Batch, error) + func (p *PendingBatch) Finally(fn func(ctx context.Context, b *Batch)) *PendingBatch + func (p *PendingBatch) FinallyJob(job Job) *PendingBatch + func (p *PendingBatch) Jobs() []any + func (p *PendingBatch) Name(name string) *PendingBatch + func (p *PendingBatch) OnConnection(name string) *PendingBatch + func (p *PendingBatch) OnQueue(name string) *PendingBatch + func (p *PendingBatch) Progress(fn func(ctx context.Context, b *Batch)) *PendingBatch + func (p *PendingBatch) ProgressJob(job Job) *PendingBatch + func (p *PendingBatch) Target() (connection, queue string) + func (p *PendingBatch) Then(fn func(ctx context.Context, b *Batch)) *PendingBatch + func (p *PendingBatch) ThenJob(job Job) *PendingBatch + type PendingChain struct + func (c *PendingChain) Catch(fn func(ctx context.Context, err error)) *PendingChain + func (c *PendingChain) CatchJob(job Job) *PendingChain + func (c *PendingChain) Delay(d time.Duration) *PendingChain + func (c *PendingChain) Dispatch(ctx context.Context) (string, error) + func (c *PendingChain) Jobs() []any + func (c *PendingChain) OnConnection(name string) *PendingChain + func (c *PendingChain) OnQueue(name string) *PendingChain + type PendingDispatch struct + func (p *PendingDispatch) AfterCommit() *PendingDispatch + func (p *PendingDispatch) BeforeCommit() *PendingDispatch + func (p *PendingDispatch) Catch(fn func(ctx context.Context, err error)) *PendingDispatch + func (p *PendingDispatch) CatchJob(job Job) *PendingDispatch + func (p *PendingDispatch) Chain(jobs ...any) *PendingDispatch + func (p *PendingDispatch) Delay(d time.Duration) *PendingDispatch + func (p *PendingDispatch) DelayUntil(t time.Time) *PendingDispatch + func (p *PendingDispatch) If(cond bool) *PendingDispatch + func (p *PendingDispatch) OnConnection(name string) *PendingDispatch + func (p *PendingDispatch) OnGroup(group string) *PendingDispatch + func (p *PendingDispatch) OnQueue(name string) *PendingDispatch + func (p *PendingDispatch) Send(ctx context.Context) (string, error) + func (p *PendingDispatch) WithDeduplicationID(id string) *PendingDispatch + func (p *PendingDispatch) WithoutDelay() *PendingDispatch + type QueueAfterCommit struct + func (QueueAfterCommit) ShouldQueueAfterCommit() + type QueueBusy struct + Connection string + Queue string + Size int64 + type QueueFailedOver struct + Connection string + Err error + type QueuePaused struct + Connection string + Queue string + TTL time.Duration + type QueueResumed struct + Connection string + Queue string + type QueueStatus struct + Busy bool + Connection string + Delayed int64 + OldestPending time.Time + Pending int64 + Queue string + Reserved int64 + Size int64 + type Queueable struct + func (q *Queueable) AfterCommit() + func (q *Queueable) AppendToChain(job Job) error + func (q *Queueable) Attempts() int + func (q *Queueable) Batch(ctx context.Context) (*Batch, error) + func (q *Queueable) BatchID() string + func (q *Queueable) BeforeCommit() + func (q *Queueable) DelayFor(d time.Duration) + func (q *Queueable) Delete() + func (q *Queueable) Fail(reason ...any) + func (q *Queueable) Job() *Runtime + func (q *Queueable) JobID() string + func (q *Queueable) OnConnection(name string) + func (q *Queueable) OnGroup(group string) + func (q *Queueable) OnQueue(name string) + func (q *Queueable) PrependToChain(job Job) error + func (q *Queueable) Release(delay ...time.Duration) + func (q *Queueable) ReleaseUsingBackoff() + type Reserved interface + Attempts func() int + Delete func(ctx context.Context) error + ID func() string + Payload func() []byte + Queue func() string + Release func(ctx context.Context, delay time.Duration) error + type Restorable interface + Restore func(ctx context.Context) error + type Runtime struct + func JobFrom(ctx context.Context) (*Runtime, bool) + func NewFakeRuntime(job Job, attempts int) *Runtime + func (r *Runtime) AppendToChain(job Job) error + func (r *Runtime) Attempts() int + func (r *Runtime) Batch(ctx context.Context) (*Batch, error) + func (r *Runtime) Chain() []*Payload + func (r *Runtime) Connection() string + func (r *Runtime) Delete() + func (r *Runtime) DisplayName() string + func (r *Runtime) Fail(err error) + func (r *Runtime) HasFailed() (bool, error) + func (r *Runtime) ID() string + func (r *Runtime) IsDeleted() bool + func (r *Runtime) IsReleased() (bool, time.Duration) + func (r *Runtime) Job() Job + func (r *Runtime) Manager() *Manager + func (r *Runtime) MaxTries(fallback int) int + func (r *Runtime) Name() string + func (r *Runtime) Payload() *Payload + func (r *Runtime) PrependToChain(job Job) error + func (r *Runtime) Queue() string + func (r *Runtime) Release(delay time.Duration) + func (r *Runtime) ReleaseUsingBackoff() + func (r *Runtime) SetFakeBatch(b *Batch) + func (r *Runtime) UUID() string + type ShouldBeEncrypted interface + ShouldBeEncrypted func() + type ShouldBeUnique interface + ShouldBeUnique func() + type ShouldBeUniqueUntilProcessing interface + ShouldBeUniqueUntilProcessing func() + type ShouldNotQueue interface + ShouldNotQueue func() + type ShouldQueueAfterCommit interface + ShouldQueueAfterCommit func() + type SizeReporter interface + DelayedSize func(ctx context.Context, queue string) (int64, error) + PendingSize func(ctx context.Context, queue string) (int64, error) + ReservedSize func(ctx context.Context, queue string) (int64, error) + type Sync struct + func (Sync) ShouldNotQueue() + type Tx struct + func BeginTransaction(ctx context.Context) (context.Context, *Tx) + func (t *Tx) Commit(ctx context.Context) error + func (t *Tx) Rollback() + type Unique struct + func (Unique) ShouldBeUnique() + type UniqueUntilProcessing struct + func (UniqueUntilProcessing) ShouldBeUnique() + func (UniqueUntilProcessing) ShouldBeUniqueUntilProcessing() + type WorkerIdle struct + Connection string + Queues []string + type WorkerOptions struct + Backoff []time.Duration + Connection string + Force bool + Grace time.Duration + HandleSignals bool + Maintenance func() bool + MaxJobs int + MaxTime time.Duration + MemoryMB int + MemoryPercent float64 + Name string + Once bool + Queues []string + Rest time.Duration + SkipPausePolling bool + SkipRestartPolling bool + Sleep time.Duration + StopWhenEmpty bool + Timeout time.Duration + Tries int + type WorkerStarting struct + Connection string + Options WorkerOptions + Queues []string + type WorkerStopping struct + Status int