- Add job information to status - #18 thanks to @ghaydarov
You can update you default config to get more informations about the job and the raised exception.
# config/initializers/activejob_status.rb
# Select what data you want to store.
# Available options are: :status, :serialized_job, :exception
# Default is [:status]
#
ActiveJob::Status.options = { includes: %i[status serialized_job exception] }
status = ActiveJob::Status.get(job)
# => { status: :queued, serialized_job: { "arguments" => [], "job_class" => "BaseJob", "job_id" => "d11b64e6-8631-4118-ae76-e19376769171", ... }
status = ActiveJob::Status.get(job)
# => { status: :failed, exception: { class: "NoMethodError", message:"Something went wrong" } }
- Few refactoring, updates CI, add code coverage.