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
FormatQueueID formats 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
Click to show internal directories.
Click to hide internal directories.