Class: Nppes::Jobs::SearcherJob
- Inherits:
-
Struct
- Object
- Struct
- Nppes::Jobs::SearcherJob
- Defined in:
- lib/nppes/jobs/searcher_job.rb
Instance Attribute Summary collapse
-
#period ⇒ Object
Returns the value of attribute period.
Instance Method Summary collapse
Instance Attribute Details
#period ⇒ Object
Returns the value of attribute period
3 4 5 |
# File 'lib/nppes/jobs/searcher_job.rb', line 3 def period @period end |
Instance Method Details
#after(job) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/nppes/jobs/searcher_job.rb', line 13 def after(job) if period Nppes.logger.warn 'Create next update job' Delayed::Job.enqueue(Nppes::Jobs::SearcherJob.new(period), 0, Time.now + period) end end |
#perform ⇒ Object
4 5 6 |
# File 'lib/nppes/jobs/searcher_job.rb', line 4 def perform UpdatePack::Pack.check_updates end |