Class: AsyncResponse::Expirer

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/async_response/expirer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#hashed_job_key, #job_type

Constructor Details

#initialize(worker_class, job_key) ⇒ Expirer

Returns a new instance of Expirer.



5
6
7
8
# File 'lib/async_response/expirer.rb', line 5

def initialize(worker_class, job_key)
  @worker_class = worker_class
  @job_key = job_key
end

Instance Attribute Details

#job_keyObject (readonly)

Returns the value of attribute job_key.



4
5
6
# File 'lib/async_response/expirer.rb', line 4

def job_key
  @job_key
end

#worker_classObject (readonly)

Returns the value of attribute worker_class.



4
5
6
# File 'lib/async_response/expirer.rb', line 4

def worker_class
  @worker_class
end

Instance Method Details

#expire!Object



10
11
12
# File 'lib/async_response/expirer.rb', line 10

def expire!
  AsyncResponse::Job.expire!(job_type, hashed_job_key)
end