Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

delete log after sending mail

  • Loading branch information...
commit 5da522ae3d3db1bc762a4765c61ec09bda96cd41 1 parent 30b12e5
Thomas von Deyen authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 lib/lizenzo_importer/import_job.rb
4 lib/lizenzo_importer/import_job.rb
@@ -12,7 +12,9 @@ def perform
12 12 begin
13 13 lizenzo_import = LizenzoImport.find(self.lizenzo_import_id)
14 14 results = lizenzo_import.import_data!
15   - UserMailer.lizenzo_import_results(User.find(self.user_id)).deliver
  15 + if UserMailer.lizenzo_import_results(User.find(self.user_id)).deliver
  16 + FileUtils.rm_f(LIZENZO_IMPORTER_SETTINGS[:log_to])
  17 + end
16 18 rescue Exception => exp
17 19 UserMailer.lizenzo_import_results(User.find(self.user_id), exp).deliver
18 20 end

0 comments on commit 5da522a

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