Execute task and getting output from rake

This commit is contained in:
Adam
2015-12-31 14:17:38 +01:00
parent ca91c3d16f
commit a41e997931
6 changed files with 45 additions and 5 deletions

View File

@@ -223,6 +223,7 @@ def import_single_item(row, index, logger)
success = true
rescue Exception => e
logger.error "Could not import item on row number #{index} (#{row[lookup[:name_on_ribica]]}), reason: #{e}"
puts "Could not import item on row number #{index} (#{row[lookup[:name_on_ribica]]}), reason: #{e}"
success = false
end
@@ -281,8 +282,10 @@ def do_import(validate_only)
end
rescue Exception => e
puts "Import failed, please check the import log file for error details."
puts "Error while importing: #{e}"
logger.error "Error while importing: #{e}"
end
puts "Import done"
logger.info "Import done"
end