Module: ActiveJobStatus

Defined in:
lib/active_job_status.rb,
lib/active_job_status/hooks.rb,
lib/active_job_status/redis.rb,
lib/active_job_status/version.rb,
lib/active_job_status/job_batch.rb,
lib/active_job_status/job_status.rb,
lib/active_job_status/job_tracker.rb,
lib/active_job_status/trackable_job.rb

Defined Under Namespace

Modules: Hooks, Redis Classes: JobBatch, JobStatus, JobTracker, TrackableJob

Constant Summary collapse

VERSION =
"1.2.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.expirationObject

Returns the value of attribute expiration.



11
12
13
# File 'lib/active_job_status.rb', line 11

def expiration
  @expiration
end

.storeObject

Returns the value of attribute store.



11
12
13
# File 'lib/active_job_status.rb', line 11

def store
  @store
end

Class Method Details

.fetch(job_id) ⇒ Object



17
18
19
20
# File 'lib/active_job_status.rb', line 17

def fetch(job_id)
  status = store.fetch(job_id)
  JobStatus.new(status)
end

.get_status(job_id) ⇒ Object



13
14
15
# File 'lib/active_job_status.rb', line 13

def get_status(job_id)
  fetch(job_id).status
end