ficonabses 0.3.1 → 0.3.2
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/bin/ficonabses_csv.rb +3 -1
- data/lib/ficonabses/base.rb +2 -2
- metadata +2 -2
data/bin/ficonabses_csv.rb
CHANGED
@@ -50,6 +50,7 @@ require 'pp'
|
|
50
50
|
@f.set_credentials(options[:username],options[:password])
|
51
51
|
@f.set_debug if options[:debug] # if debug sends to localhost
|
52
52
|
count=0
|
53
|
+
errors=0
|
53
54
|
flag=false
|
54
55
|
flag=options[:campaign] if options[:campaign]
|
55
56
|
#send_template(options[:template],'7923044488','scott.sproule@gmail.com',count+=1)
|
@@ -64,10 +65,11 @@ require 'pp'
|
|
64
65
|
count+=1
|
65
66
|
|
66
67
|
rescue Exception => e
|
68
|
+
errors+=1
|
67
69
|
puts "Found count: #{count} error #{e.inspect}"
|
68
70
|
end
|
69
71
|
}
|
70
72
|
|
71
73
|
|
72
74
|
# puts "response is list is #{list.to_yaml} #{finallist.to_yaml}"
|
73
|
-
puts "[#{Time.now}] FINISHED: sending: #{count}"
|
75
|
+
puts "[#{Time.now}] FINISHED: sending: #{count} error count #{errors}"
|
data/lib/ficonabses/base.rb
CHANGED
@@ -70,14 +70,14 @@ module FiconabSES
|
|
70
70
|
begin
|
71
71
|
# Don't take longer than 60 seconds -- incase there is a problem with our server continue
|
72
72
|
@clnt=HTTPClient.new
|
73
|
-
Timeout::timeout(
|
73
|
+
Timeout::timeout(60) 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
78
|
rescue HTTPClient::BadResponseError
|
79
79
|
sleep(5) # take a break to see if it is too busy
|
80
|
-
Timeout::timeout(
|
80
|
+
Timeout::timeout(25) do
|
81
81
|
puts "BAD RESPONSE - retrying once #{self.uri}"
|
82
82
|
res=self.clnt.get_content(self.uri,self.extheader)
|
83
83
|
end
|