Module: ActiveJobMetadata::Metadata

Extended by:
ActiveSupport::Concern
Included in:
All, Lifecycle, Timing
Defined in:
lib/active_job_metadata/metadata.rb

Overview

Use Metadata to define custom metadata for your job.

Instance Method Summary collapse

Instance Method Details

#metadataObject

Returns all metadata for the current job.



41
42
43
# File 'lib/active_job_metadata/metadata.rb', line 41

def 
   ||= .find(job_id) || {}
end

#metadata=(hash) ⇒ Object

Merges data into the current job’s metdata.



46
47
48
49
# File 'lib/active_job_metadata/metadata.rb', line 46

def metadata= hash
  .merge!(hash)
  
end

#save_metadataObject

Writes metadata to ‘ActiveJobMetadata.store`



52
53
54
55
56
# File 'lib/active_job_metadata/metadata.rb', line 52

def 
  .write(job_id, )
  
  
end