ficonabses 0.2.6 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ficonabses_blacklist.rb +1 -1
- data/bin/ficonabses_csv.rb +1 -1
- data/lib/ficonabses/base.rb +7 -1
- metadata +3 -3
data/bin/ficonabses_blacklist.rb
CHANGED
@@ -28,7 +28,7 @@ require 'optparse'
|
|
28
28
|
def send_row(ficonab,row,username)
|
29
29
|
#puts "row destination: #{row['destination']} template: #{row['template']} campaign: #{row['campaign']} campaign flag: #{flag}"
|
30
30
|
row['destination'].strip!
|
31
|
-
sleep(
|
31
|
+
sleep(0.2)
|
32
32
|
if row!=nil then
|
33
33
|
|
34
34
|
res =ficonab.global_blacklist(row['destination'],username)
|
data/bin/ficonabses_csv.rb
CHANGED
@@ -31,7 +31,7 @@ def send_row(ficonab,row,flag)
|
|
31
31
|
row['destination'].strip!
|
32
32
|
row['campaign'].strip! if flag
|
33
33
|
row['template'].strip! if !flag
|
34
|
-
sleep(
|
34
|
+
sleep(0.2)
|
35
35
|
if row!=nil then
|
36
36
|
|
37
37
|
res =ficonab.send_template_params(row['destination'],row['template'],row) if !flag
|
data/lib/ficonabses/base.rb
CHANGED
@@ -69,12 +69,18 @@ module FiconabSES
|
|
69
69
|
res=''
|
70
70
|
begin
|
71
71
|
# Don't take longer than 60 seconds -- incase there is a problem with our server continue
|
72
|
-
Timeout::timeout(90) do
|
73
72
|
@clnt=HTTPClient.new
|
73
|
+
Timeout::timeout(90) do
|
74
74
|
@clnt.set_auth(nil, @account, @password)
|
75
75
|
@extheader = { 'Content-Type' => 'application/xml' }
|
76
76
|
res=self.clnt.get_content(self.uri,self.extheader)
|
77
77
|
end
|
78
|
+
rescue HTTPClient::BadResponseError
|
79
|
+
Timeout::timeout(15) do
|
80
|
+
puts "BAD RESPONSE - retrying once #{self.uri}"
|
81
|
+
res=self.clnt.get_content(self.uri,self.extheader)
|
82
|
+
end
|
83
|
+
# bad response - try it again?
|
78
84
|
rescue Timeout::Error
|
79
85
|
# Too slow!!
|
80
86
|
res="failure to connect"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 8
|
9
|
+
version: 0.2.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Scott Sproule
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-
|
17
|
+
date: 2012-04-26 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies: []
|
20
20
|
|