Skip to content
Browse files

delete log after sending mail

  • Loading branch information...
1 parent 30b12e5 commit 5da522ae3d3db1bc762a4765c61ec09bda96cd41 @tvdeyen committed Jun 23, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/lizenzo_importer/import_job.rb
View
4 lib/lizenzo_importer/import_job.rb
@@ -12,7 +12,9 @@ def perform
begin
lizenzo_import = LizenzoImport.find(self.lizenzo_import_id)
results = lizenzo_import.import_data!
- UserMailer.lizenzo_import_results(User.find(self.user_id)).deliver
+ if UserMailer.lizenzo_import_results(User.find(self.user_id)).deliver
+ FileUtils.rm_f(LIZENZO_IMPORTER_SETTINGS[:log_to])
+ end
rescue Exception => exp
UserMailer.lizenzo_import_results(User.find(self.user_id), exp).deliver
end

0 comments on commit 5da522a

Please sign in to comment.
Something went wrong with that request. Please try again.