infopark_reactor 1.23.0 → 1.23.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reactor/cm/multi_xml_request.rb +4 -0
- data/lib/reactor/cm/xml_request.rb +3 -0
- data/lib/reactor/tools/uploader.rb +1 -2
- data/lib/reactor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08035464db14fa312c183892e385dded7f593935
|
4
|
+
data.tar.gz: c79cfb46fa6a49138785633696fbd6ee0dd0a790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e852cb39588abd78a769221656645b5ace2bcf5206203a3f0f8679df7a1ec5cc9f53c6bf4db6f1bc91069e713fc22a886a3c05e4c83e3cf596ead9e8a1afb408
|
7
|
+
data.tar.gz: 777b9ee8e8a4471a17f4b8bfd9dcc5c856f097994c01979d2a26753f1d0042fcee48206bf638cc6493c3da062d98a479e03cc283847ce3bec9451881140d1a8d
|
@@ -9,6 +9,9 @@ module Reactor
|
|
9
9
|
module Cm
|
10
10
|
|
11
11
|
class MultiXmlRequest
|
12
|
+
def self.timeout
|
13
|
+
Reactor::Cm::XmlRequest.timeout
|
14
|
+
end
|
12
15
|
|
13
16
|
def self.token(login, instance_secret)
|
14
17
|
Digest::MD5.hexdigest(login + instance_secret)
|
@@ -55,6 +58,7 @@ module Reactor
|
|
55
58
|
payload = xml
|
56
59
|
|
57
60
|
res = Net::HTTP.new(access[:host], access[:port]).start do |http|
|
61
|
+
http.read_timeout = self.class.timeout
|
58
62
|
req = Net::HTTP::Post.new('/xml')
|
59
63
|
req.body = payload
|
60
64
|
http.request(req)
|
@@ -18,6 +18,8 @@ module Reactor
|
|
18
18
|
LOGGER.configure(:response, :xpath => 'cm-payload/cm-response/*', :start_indent => 2)
|
19
19
|
|
20
20
|
class XmlRequest
|
21
|
+
cattr_accessor :timeout
|
22
|
+
self.timeout = 60
|
21
23
|
|
22
24
|
def self.token(login, instance_secret)
|
23
25
|
Digest::MD5.hexdigest(login + instance_secret)
|
@@ -47,6 +49,7 @@ module Reactor
|
|
47
49
|
payload = @xml
|
48
50
|
|
49
51
|
res = Net::HTTP.new(access[:host], access[:port]).start do |http|
|
52
|
+
http.read_timeout = self.class.timeout
|
50
53
|
req = Net::HTTP::Post.new('/xml')
|
51
54
|
Reactor::Cm::LOGGER.log('REQUEST:')
|
52
55
|
Reactor::Cm::LOGGER.log_xml(:request, payload)
|
@@ -75,8 +75,7 @@ module Reactor
|
|
75
75
|
|
76
76
|
response, ticket_id = nil, nil
|
77
77
|
Net::HTTP.start(self.class.streaming_host, self.class.streaming_port) do |http|
|
78
|
-
http.read_timeout =
|
79
|
-
#http.set_debug_output $stderr
|
78
|
+
http.read_timeout = Reactor::Cm::XmlRequest.timeout
|
80
79
|
response = http.request(request)
|
81
80
|
ticket_id = response.body
|
82
81
|
end
|
data/lib/reactor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.23.
|
4
|
+
version: 1.23.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|