Class: Sync::IconsWorker
- Inherits:
-
Object
- Object
- Sync::IconsWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- app/workers/sync/icons_worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(model, id, url) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/workers/sync/icons_worker.rb', line 9 def perform(model, id, url) entity = model.constantize.find(id) attempt = entity.update_attributes :remote_icon_url => "#{Terminal.config.host}/#{url}" unless attempt Sync::IconsWorker.perform_in(1.minute, model, id, url) end end |