Sha256: e902bf073ba11dce0c6a2aace6f4a8b3532c31626f05965df5b26ec2cfdf2795
Contents?: true
Size: 419 Bytes
Versions: 34
Compression:
Stored size: 419 Bytes
Contents
require 'rest-client' 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
34 entries across 34 versions & 1 rubygems