Class: CacheJSON::Worker
- Inherits:
-
Object
- Object
- CacheJSON::Worker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/cache_json/worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(klass: nil, args: {}) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/cache_json/worker.rb', line 21 def perform(klass: nil, args: {}) if klass klass.new.refresh_cache!(args: args) else generate_workers end end |
#perform_async ⇒ Object
15 16 17 18 |
# File 'lib/cache_json/worker.rb', line 15 def perform_async(*) raise 'Sidekiq gem not found. ' \ 'You can still call this worker manually via CacheJSON::Worker.new.perform' end |