Commit 06eb7d5c authored by Eteri's avatar Eteri Committed by Klaus Wölfel

fluent-plugin-wendelin: separate connection establishment and request. The...

fluent-plugin-wendelin: separate connection establishment and request. The rest of the issues is not addressed yet.
parent 78a758bb
...@@ -48,16 +48,14 @@ class WendelinClient ...@@ -48,16 +48,14 @@ class WendelinClient
:open_timeout => 60, :open_timeout => 60,
:read_timeout => 60, :read_timeout => 60,
:keep_alive_timeout => 60,) :keep_alive_timeout => 60,)
@request = Net::HTTP::Post.new(uri)
end end
# ingest `data_chunk` to a stream referenced as `reference` # ingest `data_chunk` to a stream referenced as `reference`
def ingest(reference, data_chunk) def ingest(reference, data_chunk)
uri = URI("#{@streamtool_uri}/ingest?reference=#{reference}") uri = URI("#{@streamtool_uri}/ingest?reference=#{reference}")
# call start_request if request is undefined # call start_request if request is undefined
@request ||= start_request(uri) @request ||= start_request(uri)
@request = Net::HTTP::Post.new(uri)
# connect again if the connection is not started # connect again if the connection is not started
if ! @http.started?() if ! @http.started?()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment