gi_cat_driver 0.1.2 → 0.1.3
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/lib/gi_cat_driver/version.rb +1 -1
- data/lib/gi_cat_driver.rb +3 -2
- metadata +1 -1
data/lib/gi_cat_driver.rb
CHANGED
@@ -98,7 +98,7 @@ module GiCatDriver
|
|
98
98
|
harvestersinfo_array.each do |harvester_id, harvester_title|
|
99
99
|
harvest_resource_for_active_configuration(harvester_id.to_s, harvester_title)
|
100
100
|
end
|
101
|
-
confirm_harvest_done(harvestersinfo_array)
|
101
|
+
confirm_harvest_done(harvestersinfo_array, 300)
|
102
102
|
end
|
103
103
|
|
104
104
|
#### Private Methods
|
@@ -138,6 +138,7 @@ module GiCatDriver
|
|
138
138
|
harvest_resource_request = "#{@base_url}/services/conf/brokerConfigurations/#{profile_id}/distributors/#{id}"
|
139
139
|
response = RestClient.get(harvest_resource_request, STANDARD_HEADERS)
|
140
140
|
doc = Nokogiri::XML(response)
|
141
|
+
harvestersinfo_array = {}
|
141
142
|
doc.css("component").each do |component|
|
142
143
|
harvestersinfo_array[component.css("id").text.to_sym] = component.css("title").text
|
143
144
|
end
|
@@ -197,7 +198,7 @@ module GiCatDriver
|
|
197
198
|
|
198
199
|
# Run till harvest all the resources are completed or time out
|
199
200
|
# The default timeout is 300 seconds (5 minutes)
|
200
|
-
def confirm_harvest_done(waitmax=300
|
201
|
+
def confirm_harvest_done(harvestersinfo_array, waitmax=300)
|
201
202
|
begin
|
202
203
|
puts "Info: Max wait time (timeout) for current profile is set to #{waitmax} seconds"
|
203
204
|
Timeout::timeout(waitmax) do
|