class

JoobQ::ErrorContext

Inherits JSON::Serializable / Reference / Object

Comprehensive error context system for better error handling and debugging

Constructors

from_exception(job : Job, queue : BaseQueue, exception : Exception, worker_id : String, retry_count : Int32 = 0, additional_context : Hash(String, String) = {} of String => String) : ErrorContext
Source
new(job_id : String, queue_name : String, worker_id : String, job_type : String, error_type : String, error_message : String, error_class : String, backtrace : Array(String), retry_count : Int32 = 0, job_data : String | Nil = nil, error_cause : String | Nil = nil, system_context : Hash(String, String) = {} of String => String, occurred_at : String = Time.local.to_rfc3339)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

build_system_context(queue : BaseQueue, additional : Hash(String, String)) : Hash(String, String)
Source
classify_error(exception : Exception) : String
Source
extract_backtrace(exception : Exception) : Array(String)
Source
get_hostname
Source
get_memory_usage
Source

Instance methods

backtrace
Source
error_cause
Source
error_class
Source
error_message
Source
error_type
Source
job_data
Source
job_id
Source
job_type
Source
occurred_at
Source
queue_name
Source
retry_count
Source
retry_delay
Source
severity
Source
should_retry?
Source
system_context
Source
to_log_context
Source
worker_id
Source