class Mosquito::RedisBackend
- Mosquito::RedisBackend
- Mosquito::Backend
- Reference
- Object
Extended Modules
Defined in:
mosquito/redis_backend.crConstant Summary
-
LIST_OF_OVERSEERS_KEY =
"overseers"
-
LIST_OF_QUEUES_KEY =
"queues"
-
Log =
::Log.for(self)
Constructors
Class Method Summary
- .delete(key : String, in ttl : Int64 = 0) : Nil
- .delete(key : String, in ttl : Time::Span) : Nil
- .delete_field(key : String, field : String) : Nil
- .expires_in(key : String) : Int64
- .expiring_list_fetch(key : String, expire_items_older_than : Time) : Array(String)
-
.expiring_list_push(key : String, value : String) : Nil
TODO this should take the timestamp as an argument
-
.flush : Nil
is this even a good idea?
- .get(key : String, field : String) : String | Nil
- .increment(key : String, field : String, by value : Int32) : Int64
- .increment(key : String, field : String) : Int64
- .list_overseers : Array(String)
- .list_queues : Array(String)
- .lock?(key : String, value : String, ttl : Time::Span) : Bool
- .publish(key : String, value : String) : Nil
- .redis
- .register_overseer(id : String) : Nil
- .remove_matching_key(*, keys = [] of String, args = [] of String, loadscripts = true)
- .retrieve(key : String) : Hash(String, String)
- .set(key : String, field : String, value : String) : String
- .store(key : String, value : Hash(String, String)) : Nil
- .subscribe(key : String) : Channel(Backend::BroadcastMessage)
- .unlock(key : String, value : String) : Nil
Instance Method Summary
- #dead_size : Int64
- #dequeue : JobRun | Nil
- #deschedule : Array(JobRun)
- #dump_dead_q : Array(String)
- #dump_pending_q : Array(String)
- #dump_scheduled_q : Array(String)
- #dump_waiting_q : Array(String)
-
#enqueue(job_run : JobRun) : JobRun
from queue.cr
- #finish(job_run : JobRun)
- #flush : Nil
- #pending_size : Int64
- #redis
- #schedule(job_run : JobRun, at scheduled_time : Time) : JobRun
- #scheduled_job_run_time(job_run : JobRun) : String | Nil
- #scheduled_size : Int64
- #size(include_dead = true) : Int64
- #terminate(job_run : JobRun)
- #waiting_size : Int64
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
Class Method Detail
def self.expiring_list_push(key : String, value : String) : Nil
#
TODO this should take the timestamp as an argument