fourkites-sqspoller 0.1.12.16 → 0.1.12.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sqspoller/worker_task.rb +7 -2
- data/sqspoller.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjMxNzAxZGU2NGI4NjNlYWNkYzdjMjkyNTY3YWYxMWY3YjlmMDA1Zg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWVhN2YzYzA0YmIxNDYwYjU3ZDFjMWNjYjc3MDBlZjI0YzQ4MzdlMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWIxOWEzMTA4YTAyYjM1MmM1M2E1YzQ3MTdlNzY1OGQzMTI0MzU4YTIwNDQz
|
10
|
+
MDcyMTE3YjA3NTI5Y2Y1YTYxNTY1Y2ZjNGJjNzg3YjNlMmU0OTdjYTVhNDNi
|
11
|
+
MjE0MjNmNzRlZjI0YjIyYTBmNTM3MDlkNGU1Zjg4YjNmZmVhZTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzFhYzExY2FhNWIxODhlMWMxNmE0ZjgzNDdkNDIwNzUwOTI5Nzk3ODM4NGU4
|
14
|
+
NzcwODRhYWJiNTEwYTQwNTg5YjQzNTFjMWZlMTdjMTY2ZWQ0NWU5MWNjODBl
|
15
|
+
MTA5MWU5Y2Y4NTczYmJmMWZmNWE2Y2Q1YjcxNDE3YWFhOWIyMzA=
|
@@ -9,6 +9,11 @@ module Sqspoller
|
|
9
9
|
|
10
10
|
class WorkerTask
|
11
11
|
|
12
|
+
HEADERS = {
|
13
|
+
'Content-Type' => 'application/json',
|
14
|
+
'Accept' => 'application/json'
|
15
|
+
}
|
16
|
+
|
12
17
|
def initialize(worker_configuration, logger_file)
|
13
18
|
@logger = Logger.new(logger_file)
|
14
19
|
@http_method = worker_configuration[:http_method]
|
@@ -29,11 +34,11 @@ module Sqspoller
|
|
29
34
|
@logger.info "rest-client, json params as: #{params.to_json}"
|
30
35
|
|
31
36
|
if @http_method.downcase == "post"
|
32
|
-
RestClient::Request.execute(:method => :post, :url => @http_url, :payload =>
|
37
|
+
RestClient::Request.execute(:method => :post, :url => @http_url, :payload => parsed_message.to_json, :headers => HEADERS, :timeout => 10, :open_timeout => 5) do |response, request, result|
|
33
38
|
process_http_response response
|
34
39
|
end
|
35
40
|
elsif @http_method.downcase == "get"
|
36
|
-
RestClient::Request.execute(:method => :get, :url => @http_url, :payload =>
|
41
|
+
RestClient::Request.execute(:method => :get, :url => @http_url, :payload => parsed_message.to_json, :headers => HEADERS, :timeout => 10, :open_timeout => 5) do |response, request, result|
|
37
42
|
process_http_response response
|
38
43
|
end
|
39
44
|
else
|
data/sqspoller.gemspec
CHANGED