otrs_connector 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/otrs_connector/otrs.rb +14 -5
- data/otrs_connector.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/otrs_connector/otrs.rb
CHANGED
@@ -91,15 +91,24 @@ class OTRS
|
|
91
91
|
end
|
92
92
|
|
93
93
|
|
94
|
-
def self.connect(params)
|
94
|
+
def self.connect(params, timeout=60, retries=4)
|
95
95
|
uri = self.setup_connection_params(params)
|
96
|
-
|
96
|
+
retry_counter = 0
|
97
97
|
# Connect to OTRS
|
98
98
|
begin
|
99
|
-
response = self.get_from_remote(uri)
|
99
|
+
response = self.get_from_remote(uri, timeout)
|
100
|
+
rescue EOFError
|
101
|
+
retry_counter += 1
|
102
|
+
puts "EOFError, Attempt: #{counter+1}"
|
103
|
+
retry if retry_counter < retries
|
104
|
+
raise EOFError if retry_counter >= retries
|
105
|
+
|
100
106
|
rescue Timeout::Error
|
101
|
-
|
102
|
-
|
107
|
+
retry_counter += 1
|
108
|
+
timeout = timeout*1.5
|
109
|
+
puts "Timeout::Error Attempt: #{retry_counter+1}, Timeout #{timeout}"
|
110
|
+
retry if retry_counter < retries
|
111
|
+
raise Timeout::Error if retry_counter >= retries
|
103
112
|
end
|
104
113
|
return self.process_response(response)
|
105
114
|
end
|
data/otrs_connector.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: otrs_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.1.
|
5
|
+
version: 1.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brian Goff
|
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
hash: -
|
129
|
+
hash: -3749813653450407088
|
130
130
|
segments:
|
131
131
|
- 0
|
132
132
|
version: "0"
|