Class: Sync::LogoWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/sync/logo_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(url) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'app/workers/sync/logo_worker.rb', line 9

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