class Mosquito::RedisBackend

Extended Modules

Defined in:

mosquito/redis_backend.cr

Constant Summary

LIST_OF_QUEUES_KEY = "queues"
Log = ::Log.for(self)

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Mosquito::Backend

build_key(*parts) build_key, dead_q dead_q, delete(key : String, in ttl = 0) : Nil delete, dequeue : JobRun | Nil dequeue, deschedule : Array(JobRun) deschedule, dump_dead_q : Array(String) dump_dead_q, dump_pending_q : Array(String) dump_pending_q, dump_scheduled_q : Array(String) dump_scheduled_q, dump_waiting_q : Array(String) dump_waiting_q, enqueue(job_run : JobRun) : JobRun enqueue, expires_in(key : String) : Int64 expires_in, finish(job_run : JobRun) finish, flush : Nil flush, pending_q pending_q, retrieve(key : String) : Hash(String, String) retrieve, schedule(job_run : JobRun, at scheduled_time : Time) : JobRun schedule, scheduled_job_run_time(job_run : JobRun) : String | Nil scheduled_job_run_time, scheduled_q scheduled_q, size(include_dead : Bool = true) : Int64 size, store(key : String, value : Hash(String, String)) : Nil store, terminate(job_run : JobRun) terminate, waiting_q waiting_q

Constructor methods inherited from class Mosquito::Backend

new(name : String | Symbol) new

Class methods inherited from class Mosquito::Backend

build_key(*parts) build_key, named(name) named, search_queues search_queues

Constructor Detail

def self.new(name : String | Symbol) #

[View source]

Class Method Detail

def self.delete(key : String, in ttl : Int32 = 0) : Nil #

Overload required for crystal 1.1-1.2. Soft Deprecation isn't shown, but it's here so this will get cleaned up at some point. @[Deprecated("To be removed when support for 1.1 is dropped. See RedisBackend.delete(String, Int64).")]


[View source]
def self.delete(key : String, in ttl : Int64 = 0) : Nil #

[View source]
def self.delete(key : String, in ttl : Time::Span) : Nil #

[View source]
def self.expires_in(key : String) : Int64 #

[View source]
def self.flush : Nil #

is this even a good idea?


[View source]
def self.get(key : String, field : String) : String | Nil #

[View source]
def self.increment(key : String, field : String, by value : Int32) : Int64 #

[View source]
def self.increment(key : String, field : String) : Int64 #

[View source]
def self.list_queues : Array(String) #

[View source]
def self.list_runners : Array(String) #

[View source]
def self.lock?(key : String, value : String, ttl : Time::Span) : Bool #

[View source]
def self.redis #

[View source]
def self.remove_matching_key(*, keys = [] of String, args = [] of String, loadscripts = true) #

[View source]
def self.retrieve(key : String) : Hash(String, String) #

[View source]
def self.set(key : String, field : String, value : String) : String #

[View source]
def self.store(key : String, value : Hash(String, String)) : Nil #

[View source]
def self.unlock(key : String, value : String) : Nil #

[View source]

Instance Method Detail

def dequeue : JobRun | Nil #

[View source]
def deschedule : Array(JobRun) #

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

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

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

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

[View source]
def enqueue(job_run : JobRun) : JobRun #
Description copied from class Mosquito::Backend

from queue.cr


[View source]
def finish(job_run : JobRun) #

[View source]
def flush : Nil #

[View source]
def redis #

[View source]
def schedule(job_run : JobRun, at scheduled_time : Time) : JobRun #

[View source]
def scheduled_job_run_time(job_run : JobRun) : String | Nil #

[View source]
def size(include_dead = true) : Int64 #

[View source]
def terminate(job_run : JobRun) #

[View source]