class Sidekiq::BasicFetch

Defined in:

sidekiq/server/fetch.cr

Constant Summary

TIMEOUT = 2

We want the fetch operation to timeout every few seconds so we can check if the process is shutting down.

Constructors

Instance Method Summary

Instance methods inherited from class Sidekiq::Fetch

bulk_requeue(ctx : Sidekiq::Context, jobs : Array(UnitOfWork)) : Int32 bulk_requeue, retrieve_work(ctx : Sidekiq::Context) : UnitOfWork | Nil retrieve_work

Constructor Detail

def self.new(queues) #

[View source]

Instance Method Detail

def bulk_requeue(ctx, inprogress : Array(Sidekiq::UnitOfWork)) : Int32 #

[View source]
def queues : Array(String) #

[View source]
def queues_cmd #

Creating the Redis#brpop command takes into account any configured queue weights. By default Redis#brpop returns data from the first queue that has pending elements. We recreate the queue command each time we invoke Redis#brpop to honor weights and avoid queue starvation.


[View source]
def retrieve_work(ctx) : Sidekiq::UnitOfWork | Nil #

[View source]
def strict! #

[View source]