Class: Stenotype::ContextHandlers::Rails::ActiveJob
- Defined in:
- lib/stenotype/context_handlers/rails/active_job.rb
Overview
ActiveJob handler to support fetching data out of an ActiveJob instance
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#as_json(*_args) ⇒ Hash
A JSON representation of job's data.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Stenotype::ContextHandlers::Base
Instance Method Details
#as_json(*_args) ⇒ Hash
TODO:
How to deal with _args? It won't necessarily respond to #as_json
Returns a JSON representation of job's data.
22 23 24 25 26 27 28 29 |
# File 'lib/stenotype/context_handlers/rails/active_job.rb', line 22 def as_json(*_args) { job_id: job_id, enqueued_at: Time.now.utc, queue_name: queue_name, class: context.class.name, } end |