otrs_connector 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
@@ -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
- response = self.get_from_remote(uri,120)
102
- return self.process_response(response)
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "otrs_connector"
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Goff"]
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.0
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: -2300522192988681376
129
+ hash: -3749813653450407088
130
130
  segments:
131
131
  - 0
132
132
  version: "0"