Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
on :import_aborted notify error
Browse files Browse the repository at this point in the history
  • Loading branch information
lporras committed Nov 20, 2013
1 parent a38c233 commit a949c56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/importr/importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def initialize(file, options = {})
notify(:base, error: e.message)
end

on :import_aborted do |message|
notify(:base, error: message)
end

on :import_finished do
data_import.update_attribute(:finished, true) if data_import
end
Expand All @@ -47,7 +51,7 @@ def update_counters(err= {})
total_rows: row_count,
}
if data_import
data_import.update_attributes(@counters)
data_import.update_attributes(@counters)
add_error(err) unless err.blank?
end
end
Expand Down

0 comments on commit a949c56

Please sign in to comment.