lib/eco/api/session/batch.rb in eco-helpers-3.0.4 vs lib/eco/api/session/batch.rb in eco-helpers-3.0.5
- old
+ new
@@ -139,11 +139,11 @@
pending_for_server_error = data.to_a[0..]
data.each_slice(per_page) do |slice|
msg = "starting batch '#{method}' iteration #{iteration}/#{iterations},"
msg << " with #{slice.length} entries of #{data.length} -- #{done} done"
msg << " (last: #{str_stats(start_slice, slice.length)}; total: #{str_stats(start_time, done)})"
- logger.info(msg) unless silent
+ log(:info) { msg } unless silent
start_slice = Time.now
offer_retry_on(Ecoportal::API::Errors::TimeOut) do
people_api.batch(job_mode: false) do |batch|
slice.each do |person|
@@ -164,10 +164,10 @@
end # next slice
# temporary working around (due to back-end problems with batch/jobs)
unless pending_for_server_error.empty?
msg = "Going to re-try #{pending_for_server_error.count} due to server errors"
- logger.info(msg) unless silent
+ log(:info) { msg } unless silent
launch_batch(
pending_for_server_error,
status: status,
method: method,