class JoobQ::RedisStore

Defined in:

joobq/redis_store.cr

Constructors

Instance Method Summary

Instance methods inherited from class JoobQ::Store

clear_queue(queue_name : String) : Nil clear_queue, delete_job(job : JoobQ::Job) : Nil delete_job, dequeue(queue_name : String, klass : Class) : Job | Nil dequeue, enqueue(job : JoobQ::Job) : String enqueue, fetch_due_jobs(current_time : Time) : Array(String) fetch_due_jobs, list_jobs(queue_name : String, page_number : Int32 = 1, page_size : Int32 = 200) : Array(String) list_jobs, mark_as_dead(job : JoobQ::Job, expiration_time : String) : Nil mark_as_dead, mark_as_failed(job : JoobQ::Job, error_details : Hash) : Nil mark_as_failed, move_job_back_to_queue(queue_name : String) : Bool move_job_back_to_queue, queue_size(queue_name : String) : Int64 queue_size, schedule(job : JoobQ::Job, delay_in_ms : Int64) : Nil schedule

Constructor Detail

def self.new(host : String = ENV.fetch("REDIS_HOST", "localhost"), port : Int32 = (ENV.fetch("REDIS_PORT", "6379")).to_i, password : String | Nil = ENV["REDIS_PASS"]?, pool_size : Int32 = (ENV.fetch("REDIS_POOL_SIZE", "100")).to_i, pool_timeout : Float64 = 0.5) #

[View source]

Instance Method Detail

def clear_queue(queue_name : String) : Nil #

[View source]
def delete_job(job : Job) : Nil #

[View source]
def dequeue(queue_name : String, klass : Class) : Job | Nil #

[View source]
def enqueue(job : Job) : String #

[View source]
def fetch_due_jobs(current_time = Time.local) : Array(String) #

[View source]
def list_jobs(queue_name : String, page_number : Int32 = 1, page_size : Int32 = 200) : Array(String) #

[View source]
def mark_as_dead(job : Job, expiration_time : String) : Nil #

[View source]
def mark_as_failed(job : JoobQ::Job, error_details : Hash) : Nil #

[View source]
def move_job_back_to_queue(queue_name : String) : Bool #

[View source]
def queue_size(queue_name : String) : Int64 #

[View source]
def redis : Redis::PooledClient #

[View source]
def reset : Nil #

[View source]
def schedule(job : Job, delay_in_ms : Int64) : Nil #

[View source]
def set_size(set_name : String) : Int64 #

[View source]