abstract class Mosquito::QueuedJob

Defined in:

mosquito/queued_job.cr

Macro Summary

Instance Method Summary

Instance methods inherited from class Mosquito::Job

aborted?(*args, **options)
aborted?(*args, **options, &)
aborted?
, after_hook after_hook, before_hook before_hook, exception : Exception | Nil exception, executed?(*args, **options)
executed?(*args, **options, &)
executed?
, fail(reason = "", *, retry : Bool = true) fail, failed?(*args, **options)
failed?(*args, **options, &)
failed?
, job_run_id : String | Nil job_run_id, job_run_id=(job_run_id : String | Nil) job_run_id=, log(message) log, metadata : Metadata metadata, perform perform, reschedule_interval(retry_count : Int32) : Time::Span reschedule_interval, rescheduleable?(retry_count : Int32) : Bool
rescheduleable? : Bool
rescheduleable?
, retry_later retry_later, run run, should_retry : Bool should_retry, should_retry=(should_retry : Bool) should_retry=, state : Mosquito::Job::State state, succeeded?(*args, **options)
succeeded?(*args, **options, &)
succeeded?

Class methods inherited from class Mosquito::Job

metadata : Metadata metadata, metadata_key metadata_key, queue queue, queue_name : String queue_name

Macros inherited from class Mosquito::Job

after(&block) after, before(&block) before, queue_name(name) queue_name

Instance methods inherited from module Mosquito::Serializers::Primitives

deserialize_bool(raw : String) : Bool deserialize_bool, deserialize_char(raw : String) : Char deserialize_char, deserialize_float32(raw : String) : Float32 | Nil deserialize_float32, deserialize_float64(raw : String) : Float64 | Nil deserialize_float64, deserialize_int128(raw : String) : Int128 | Nil deserialize_int128, deserialize_int16(raw : String) : Int16 | Nil deserialize_int16, deserialize_int32(raw : String) : Int32 | Nil deserialize_int32, deserialize_int64(raw : String) : Int64 | Nil deserialize_int64, deserialize_int8(raw : String) : Int8 | Nil deserialize_int8, deserialize_string(raw : String) : String deserialize_string, deserialize_u_int128(raw : String) : UInt128 | Nil deserialize_u_int128, deserialize_u_int16(raw : String) : UInt16 | Nil deserialize_u_int16, deserialize_u_int32(raw : String) : UInt32 | Nil deserialize_u_int32, deserialize_u_int64(raw : String) : UInt64 | Nil deserialize_u_int64, deserialize_u_int8(raw : String) : UInt8 | Nil deserialize_u_int8, deserialize_uuid(raw : String) : UUID deserialize_uuid, serialize_bool(value : Bool) : String serialize_bool, serialize_char(char : Char) : String serialize_char, serialize_float32(value) : String serialize_float32, serialize_float64(value) : String serialize_float64, serialize_int128(value) : String serialize_int128, serialize_int16(value) : String serialize_int16, serialize_int32(value) : String serialize_int32, serialize_int64(value) : String serialize_int64, serialize_int8(value) : String serialize_int8, serialize_string(str : String) : String serialize_string, serialize_symbol(sym : Symbol) : Nil serialize_symbol, serialize_u_int128(value) : String serialize_u_int128, serialize_u_int16(value) : String serialize_u_int16, serialize_u_int32(value) : String serialize_u_int32, serialize_u_int64(value) : String serialize_u_int64, serialize_u_int8(value) : String serialize_u_int8, serialize_uuid(uuid : UUID) : String serialize_uuid

Macro Detail

macro after_enqueue(&block) #

Fired after a job is enqueued.


macro before_enqueue(&block) #

Fired before a job is enqueued. Allows preventing enqueue at the job level.

class SomeJob < Mosquito::QueuedJob before_enqueue do # return false to prevent enqueue end end


Instance Method Detail

def after_enqueue_hook(job : JobRun) : Nil #

def before_enqueue_hook(job : JobRun) : Bool #

def enqueue(in delay_interval : Time::Span) : JobRun #

def enqueue(at execute_time : Time) : JobRun #

def enqueue : JobRun #