Sha256: 8d15f6fea74c4e5114b5bec15cc2678c95823914040f4557a5d3518d990853d7

Contents?: true

Size: 383 Bytes

Versions: 32

Compression:

Stored size: 383 Bytes

Contents

require 'rest-client'

module Sync
  class LogoWorker
    include Sidekiq::Worker

    sidekiq_options :retry => true, :queue => :sync

    def perform(url)
      if url.nil?
        Terminal.logo_url = nil
      else
        uploader = IconUploader.new
        uploader.download! "#{Terminal.config.host}/#{url}"
        Terminal.logo_url = uploader.url
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
smartkiosk-client-0.2.1 app/workers/sync/logo_worker.rb
smartkiosk-client-0.2 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.19 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.18 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.17 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.16 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.15 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.14 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.13 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.12 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.11 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.10 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.9 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.8 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.7 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.6 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.5 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.4 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.3 app/workers/sync/logo_worker.rb
smartkiosk-client-0.1.2 app/workers/sync/logo_worker.rb