sidekiq

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJobEmptyQueue = errors.New("sidekiq: empty job queue")
	ErrJobEmptyClass = errors.New("sidekiq: empty job class")
	ErrJobEmptyID    = errors.New("sidekiq: empty job id")
	ErrJobCreatedAt  = errors.New("sidekiq: job created_at should be > 0")
	ErrJobEnqueuedAt = errors.New("sidekiq: job enqueued_at should be > 0")
	ErrJobArgs       = errors.New("sidekiq: job args should be an array")
)

sidekiq job validation errors

View Source
var (
	ErrInvalidQueueID = errors.New("sidekiq: queue id should have format: SIDEKIQ_QUEUE/SIDEKIQ_CLASS")
)

sidekiq queue id validation errors

Functions

func FormatQueueID added in v0.1.11

func FormatQueueID(queue, class string) string

FormatQueueID formats sidekiq queue and class.

func ParseQueueID added in v0.1.11

func ParseQueueID(s string) (string, string, error)

ParseQueueID extracts sidekiq queue and class.

Types

type Queue added in v0.1.11

type Queue interface {
	work.ExternalEnqueuer
	work.ExternalBulkEnqueuer
}

Queue can enqueue to sidekiq-compatible queue.

func NewQueue

func NewQueue(client redis.UniversalClient) Queue

NewQueue creates a new queue stored in redis with sidekiq-compatible format.

Jobs that will happen in the future are directly placed on sidekiq scheduled queue. This assumes that there is another sidekiq instance that is already running, which moves scheduled jobs into corresponding queues. https://github.com/mperham/sidekiq/blob/e3839682a3d219b8a3708feab607c74241bc06b8/lib/sidekiq/scheduled.rb#L12

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL