Versions in this module Expand all Collapse all v0 v0.0.1 Feb 19, 2026 v0.0.0 Feb 19, 2026 Changes in this version + var ErrNotDeleted = fmt.Errorf("nothing deleted") + var ErrNotRetried = fmt.Errorf("nothing retried") + type BackoffCalculator func(job *Job) int64 + func ExponentialBackoff() BackoffCalculator + func FixedBackoff(seconds int64) BackoffCalculator + func LinearBackoff(baseSeconds int64) BackoffCalculator + type BackoffStrategy int + const BackoffExponential + const BackoffFixed + const BackoffLinear + type Client struct + func NewClient(namespace string, pool *redis.Pool) *Client + func (c *Client) AddPeriodicSchedule(schedule *PeriodicSchedule) error + func (c *Client) DeadJobs(page uint) ([]*DeadJob, int64, error) + func (c *Client) DeleteAllDeadJobs() error + func (c *Client) DeleteDeadJob(diedAt int64, jobID string) error + func (c *Client) DeletePeriodicSchedule(name string) error + func (c *Client) DeleteRetryJob(retryAt int64, jobID string) error + func (c *Client) DeleteScheduledJob(scheduledFor int64, jobID string) error + func (c *Client) DisablePeriodicSchedule(name string) error + func (c *Client) EnablePeriodicSchedule(name string) error + func (c *Client) HistoryCount() (int64, error) + func (c *Client) HistoryJobByID(jobID string) (*HistoryJob, error) + func (c *Client) HistoryJobs(page uint, jobName string) ([]*HistoryJob, int64, error) + func (c *Client) PeriodicSchedules() ([]*PeriodicSchedule, error) + func (c *Client) Queues() ([]*Queue, error) + func (c *Client) RedisInfo() (*RedisStats, error) + func (c *Client) RetryAllDeadJobs() error + func (c *Client) RetryDeadJob(diedAt int64, jobID string) error + func (c *Client) RetryJobs(page uint) ([]*RetryJob, int64, error) + func (c *Client) ScheduledJobs(page uint) ([]*ScheduledJob, int64, error) + func (c *Client) WorkerObservations() ([]*WorkerObservation, error) + func (c *Client) WorkerPoolHeartbeats() ([]*WorkerPoolHeartbeat, error) + type DeadJob struct + DiedAt int64 + type EnqueueOptions struct + Delay time.Duration + Retry *RetryOptions + Unique bool + UniqueKey map[string]interface{} + type Enqueuer struct + Namespace string + Pool *redis.Pool + func NewEnqueuer(namespace string, pool *redis.Pool) *Enqueuer + func (e *Enqueuer) Enqueue(jobName string, args map[string]interface{}) (*Job, error) + func (e *Enqueuer) EnqueueIn(jobName string, secondsFromNow int64, args map[string]interface{}) (*ScheduledJob, error) + func (e *Enqueuer) EnqueueUnique(jobName string, args map[string]interface{}) (*Job, error) + func (e *Enqueuer) EnqueueUniqueByKey(jobName string, args map[string]interface{}, keyMap map[string]interface{}) (*Job, error) + func (e *Enqueuer) EnqueueUniqueIn(jobName string, secondsFromNow int64, args map[string]interface{}) (*ScheduledJob, error) + func (e *Enqueuer) EnqueueUniqueInByKey(jobName string, secondsFromNow int64, args map[string]interface{}, ...) (*ScheduledJob, error) + func (e *Enqueuer) EnqueueWithOptions(jobName string, args map[string]interface{}, opts EnqueueOptions) (*Job, error) + type GenericHandler func(*Job) error + type GenericMiddlewareHandler func(*Job, NextMiddlewareFunc) error + type HistoryJob struct + CompletedAt int64 + Status string + type Job struct + Args map[string]interface{} + BackoffBase *int64 + BackoffType *int + EnqueuedAt int64 + FailedAt int64 + Fails int64 + ID string + LastErr string + MaxRetries *int64 + Name string + Unique bool + UniqueKey string + func (j *Job) ArgBool(key string) bool + func (j *Job) ArgError() error + func (j *Job) ArgFloat64(key string) float64 + func (j *Job) ArgInt64(key string) int64 + func (j *Job) ArgString(key string) string + func (j *Job) Checkin(msg string) + type JobOptions struct + Backoff BackoffCalculator + MaxConcurrency uint + MaxFails uint + Priority uint + SkipDead bool + type NextMiddlewareFunc func() error + type PeriodicSchedule struct + Args map[string]interface{} + CreatedAt int64 + Enabled bool + JobName string + Name string + Spec string + UpdatedAt int64 + type Q map[string]interface + type Queue struct + Count int64 + JobName string + Latency int64 + type RedisStats struct + ConnectedClients int64 + DBKeys int64 + KeyspaceHits int64 + KeyspaceMisses int64 + OpsPerSec int64 + TotalCommands int64 + UptimeSeconds int64 + UsedMemory int64 + UsedMemoryHuman string + UsedMemoryPeak string + Version string + type RetryJob struct + RetryAt int64 + type RetryOptions struct + Backoff BackoffCalculator + BaseDelay int64 + MaxRetries int64 + Strategy BackoffStrategy + type ScheduledJob struct + RunAt int64 + type WorkerObservation struct + ArgsJSON string + Checkin string + CheckinAt int64 + IsBusy bool + JobID string + JobName string + StartedAt int64 + WorkerID string + type WorkerPool struct + func NewWorkerPool(ctx interface{}, concurrency uint, namespace string, pool *redis.Pool) *WorkerPool + func NewWorkerPoolWithOptions(ctx interface{}, concurrency uint, namespace string, pool *redis.Pool, ...) *WorkerPool + func (wp *WorkerPool) Daily(jobName string, hour, minute int) *WorkerPool + func (wp *WorkerPool) Drain() + func (wp *WorkerPool) Every(jobName string, d time.Duration) *WorkerPool + func (wp *WorkerPool) Hourly(jobName string, minute int) *WorkerPool + func (wp *WorkerPool) Job(name string, fn interface{}) *WorkerPool + func (wp *WorkerPool) JobWithOptions(name string, jobOpts JobOptions, fn interface{}) *WorkerPool + func (wp *WorkerPool) Middleware(fn interface{}) *WorkerPool + func (wp *WorkerPool) PeriodicallyEnqueue(spec string, jobName string) *WorkerPool + func (wp *WorkerPool) PeriodicallyEnqueueWithArgs(spec string, jobName string, args map[string]interface{}) *WorkerPool + func (wp *WorkerPool) Start() + func (wp *WorkerPool) Stop() + type WorkerPoolHeartbeat struct + Concurrency uint + HeartbeatAt int64 + Host string + JobNames []string + Pid int + StartedAt int64 + WorkerIDs []string + WorkerPoolID string + type WorkerPoolOptions struct + SleepBackoffs []int64