class Mosquito::Runners::Coordinator

Overview

primer? loader? scheduler

Defined in:

mosquito/runners/coordinator.cr

Constant Summary

LockTTL = 30.seconds
Log = ::Log.for(self)

Constructors

Instance Method Summary

Constructor Detail

def self.new(queue_list : Mosquito::Runners::QueueList) #

Instance Method Detail

def enqueue_delayed_jobs #

def enqueue_periodic_jobs #

def instance_id : String #

def is_leader? : Bool #

def lock_key : String #

def only_if_coordinator(&) : Nil #

def post_run : Nil #

def queue_list : QueueList #

def release_leadership_lock : Nil #

Releases the coordinator lease. Call during shutdown so another instance can take over immediately instead of waiting for the TTL to expire.


def runnable_name : String #

def schedule : Nil #