Sha256: c6ef2360b7bf6301747ea738eb49bb03272a9fd46223de4ae17f00ed1a72c426
Contents?: true
Size: 462 Bytes
Versions: 7
Compression:
Stored size: 462 Bytes
Contents
require 'rest-client' Application.load 'lib/smartkiosk/sidekiq' module Sync class IconsWorker include Sidekiq::Worker sidekiq_options :retry => false, :queue => :sync 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 end end
Version data entries
7 entries across 7 versions & 1 rubygems