|
|
|
@ -17,9 +17,13 @@ class SyncTrustieJob < ApplicationJob
|
|
|
|
|
"number": count
|
|
|
|
|
}
|
|
|
|
|
uri = URI.parse(url)
|
|
|
|
|
|
|
|
|
|
http = Net::HTTP.new(uri.hostname, uri.port)
|
|
|
|
|
http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'})
|
|
|
|
|
Rails.logger.info("#######_________response__sync__end_____#########")
|
|
|
|
|
if token_url.include?("https://")
|
|
|
|
|
http.use_ssl = true
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response = http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'})
|
|
|
|
|
Rails.logger.info("#######_________response__sync__end_____#########{response.body}")
|
|
|
|
|
end
|
|
|
|
|
end
|