abstract class Mosquito::Backend::Queue

Direct Known Subclasses

Defined in:

mosquito/backend.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(backend : Mosquito::Backend, name : String) #

Instance Method Detail

def backend : Backend #

abstract def dead_size : Int64 #

abstract def dequeue : JobRun | Nil #

abstract def deschedule : Array(JobRun) #

abstract def enqueue(job_run : JobRun) : JobRun #

Queue operations


abstract def finish(job_run : JobRun) #

abstract def flush : Nil #

abstract def list_dead : Array(String) #

abstract def list_pending : Array(String) #

abstract def list_scheduled : Array(String) #

abstract def list_waiting : Array(String) #

abstract def pause(duration : Time::Span | Nil = nil) : Nil #

Pause this queue so that #dequeue returns nil until it is resumed or the optional duration expires.


abstract def paused? : Bool #

abstract def pending_size : Int64 #

abstract def resume : Nil #

Resume a paused queue, allowing dequeue to proceed.


abstract def schedule(job_run : JobRun, at scheduled_time : Time) : JobRun #

abstract def scheduled_job_run_time(job_run : JobRun) : Time | Nil #

abstract def scheduled_size : Int64 #

abstract def size(include_dead : Bool = true) : Int64 #

abstract def terminate(job_run : JobRun) #

abstract def undequeue : JobRun | Nil #

abstract def waiting_size : Int64 #