Sha256: 17259a8c5bda72e8db1a8d15e920ff27f073226a4fb097166a79b50f2477e0fc

Contents?: true

Size: 444 Bytes

Versions: 4

Compression:

Stored size: 444 Bytes

Contents

require 'httpclient'

module WatCatcher
  class Poster < ActiveJob::Base

    def perform(url, params)
      HTTPClient.post_content(url,
                              body: params.to_json,
                              header: {"Content-Type" => "application/json; charset=utf-8"})
    rescue => excpt
      Rails.logger.error( "WatCatcher::Poster error thrown by wat_catcher!: #{excpt.inspect}" )

      retry_job(wait: 10)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
wat_catcher-0.10.11 lib/wat_catcher/poster.rb
wat_catcher-0.10.10 lib/wat_catcher/poster.rb
wat_catcher-0.10.9 lib/wat_catcher/poster.rb
wat_catcher-0.10.8 lib/wat_catcher/poster.rb