Skip to content

Commit

Permalink
Bulk upload emails weren't getting delivered.
Browse files Browse the repository at this point in the history
  • Loading branch information
kueda committed May 28, 2015
1 parent cd466da commit 4239cbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/bulk_observation_file.rb
Expand Up @@ -34,7 +34,7 @@ def initialize(observation_file, project_id, coord_system, user)
@project = Project.find_by_id(project_id)
if @project.nil?
e = BulkObservationException.new('Specified project not found')
Emailer.delay.bulk_observation_error(user, File.basename(observation_file), e)
Emailer.delay.bulk_observation_error(user, File.basename(observation_file), e).deliver
end
end

Expand All @@ -50,13 +50,13 @@ def perform
import_file

# Email uploader to say that the upload has finished.
Emailer.bulk_observation_success(@user, File.basename(@observation_file))
Emailer.bulk_observation_success(@user, File.basename(@observation_file)).deliver
rescue BulkObservationException => e
# Collate the errors into a hash for emailing
error_details = collate_errors(e)

# Email the uploader with exception details
Emailer.bulk_observation_error(@user, File.basename(@observation_file), error_details)
Emailer.bulk_observation_error(@user, File.basename(@observation_file), error_details).deliver
end
end

Expand Down

0 comments on commit 4239cbc

Please sign in to comment.