class Mosquito::Runners::Executor

Overview

An Executor is responsible for building Job classes with deserialized parameters and calling #run on them. It measures the time it takes to run a job and provides detailed log messages about the current status.

Executor#deqeue_and_run_jobs is the entrypoint and shoud be treated as if it will return only after a relative eternity.

Included Modules

Defined in:

mosquito/runners/executor.cr

Constant Summary

Log = ::Log.for(self)

Constructors

Instance Method Summary

Instance methods inherited from module Mosquito::Runners::RunAtMost

execution_timestamps execution_timestamps

Constructor Detail

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

[View source]

Instance Method Detail

def dequeue_and_run_jobs #

[View source]
def failed_job_ttl : Int32 #

How long a job config is persisted after failure


[View source]
def failed_job_ttl=(failed_job_ttl : Int32) #

How long a job config is persisted after failure


[View source]
def queue_list : QueueList #

[View source]
def run_next_job(q : Queue) #

[View source]
def successful_job_ttl : Int32 #

How long a job config is persisted after success


[View source]
def successful_job_ttl=(successful_job_ttl : Int32) #

How long a job config is persisted after success


[View source]
def time_with_units(seconds : Float64) #

[View source]