Fix for reindex console output too large
This commit is contained in:
@@ -74,10 +74,10 @@ class ItemsController < ApplicationController
|
|||||||
when 'import_items'
|
when 'import_items'
|
||||||
@output = ItemsHelper::execute_command("rake ribica:import_items -f #{Rails.root}/Rakefile")
|
@output = ItemsHelper::execute_command("rake ribica:import_items -f #{Rails.root}/Rakefile")
|
||||||
@output.collect{|x| x.sub! "\n", "" }
|
@output.collect{|x| x.sub! "\n", "" }
|
||||||
ItemsHelper::execute_command("rake ribica:reindex -f #{Rails.root}/Rakefile") unless RakeTasksHelper::is_error_occurred @output
|
%x(rake ribica:reindex -f #{Rails.root}/Rakefile) unless RakeTasksHelper::is_error_occurred @output
|
||||||
when 'update_prices'
|
when 'update_prices'
|
||||||
@output = ItemsHelper::execute_command("rake ribica:update_prices -f #{Rails.root}/Rakefile")
|
@output = ItemsHelper::execute_command("rake ribica:update_prices -f #{Rails.root}/Rakefile")
|
||||||
ItemsHelper::execute_command("rake ribica:reindex -f #{Rails.root}/Rakefile") unless RakeTasksHelper::is_error_occurred @output
|
%x(rake ribica:reindex -f #{Rails.root}/Rakefile) unless RakeTasksHelper::is_error_occurred @output
|
||||||
else
|
else
|
||||||
@error_message = "There is no such task"
|
@error_message = "There is no such task"
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ def do_import(validate_only)
|
|||||||
end
|
end
|
||||||
|
|
||||||
lookup = get_column_lookup
|
lookup = get_column_lookup
|
||||||
path = Rails.root.join(input_file)
|
path = Rails.root.join(input_file) if validate_only
|
||||||
|
|
||||||
log_filename = Rails.root.join("import.log")
|
log_filename = Rails.root.join("import.log")
|
||||||
log_filename = Rails.root.join("import_validate.log")
|
log_filename = Rails.root.join("import_validate.log")
|
||||||
|
|||||||
Reference in New Issue
Block a user