Class: Sftui::PublishScannerDataWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/sftui/publish_scanner_data_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(data) ⇒ Object

Raises:

  • (StandardError.new)


10
11
12
13
# File 'lib/sftui/publish_scanner_data_worker.rb', line 10

def perform(data)
  response = HTTParty.post("#{ENV['SMART_FACTORY_API_HOST']}/api/v1/scanner_data", body: data)
  raise StandardError.new, response.message unless response.success?
end