abstract class
Mosquito::Backend
- Mosquito::Backend
- Reference
- Object
Direct Known Subclasses
Defined in:
mosquito/backend.crConstant Summary
-
KEY_PREFIX =
{"mosquito"} -
QUEUES =
["waiting", "scheduled", "pending", "dead"] of ::String -
The lifecycle states a job run passes through in any backend.
Instance Method Summary
- #average(key : String) : Int32
-
#average_push(key : String, value : Int32, window_size : Int32 = 100) : Nil
Metrics
- #build_key(*parts)
- #delete(key : String, in ttl : Int64 = 0) : Nil
- #delete(key : String, in ttl : Time::Span) : Nil
- #delete_field(key : String, field : String) : Nil
- #deregister_overseer(id : String) : Nil
- #expires_in(key : String) : Int64
- #flush : Nil
- #get(key : String, field : String) : String | Nil
- #increment(key : String, field : String, by value : Int32) : Int64
- #increment(key : String, field : String) : Int64
- #list_active_overseers(since : Time) : Array(String)
- #list_overseers : Array(String)
-
#list_queues : Array(String)
Global
- #lock?(key : String, value : String, ttl : Time::Span) : Bool
- #publish(key : String, value : String) : Nil
-
#queue(name : String | Symbol) : Queue
Factory method to create a named queue for this backend.
- #register_overseer(id : String) : Nil
- #retrieve(key : String) : Hash(String, String)
- #set(key : String, field : String, value : String) : String
- #set(key : String, values : Hash(String, String | Nil) | Hash(String, Nil) | Hash(String, String)) : Nil
-
#store(key : String, value : Hash(String, String | Nil) | Hash(String, String)) : Nil
Storage
- #subscribe(key : String) : Channel(BroadcastMessage)
-
#unlock(key : String, value : String) : Nil
Coordination
Instance Method Detail
Factory method to create a named queue for this backend.
abstract
def set(key : String, values : Hash(String, String | Nil) | Hash(String, Nil) | Hash(String, String)) : Nil
#
abstract
def store(key : String, value : Hash(String, String | Nil) | Hash(String, String)) : Nil
#
Storage