diff options
| author | Zog | 2018-02-21 08:08:40 +0100 | 
|---|---|---|
| committer | Zog | 2018-02-21 16:18:34 +0100 | 
| commit | 70396ae000bfc5c2b792c17198efc2a8d87d9ebf (patch) | |
| tree | dad5558cd81b96b2532eae140293cf8f2b680ead /app/models | |
| parent | a357c68cc96c642f15991a85e3982f4553c32a22 (diff) | |
| download | chouette-core-70396ae000bfc5c2b792c17198efc2a8d87d9ebf.tar.bz2 | |
Move importers outputs in logs
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/simple_importer.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/simple_importer.rb b/app/models/simple_importer.rb index aacf85a9e..d6ba64494 100644 --- a/app/models/simple_importer.rb +++ b/app/models/simple_importer.rb @@ -95,7 +95,8 @@ class SimpleImporter < ActiveRecord::Base    end    def dump_csv_from_context -    filepath = "./#{self.configuration_name}_#{Time.now.strftime "%y%m%d%H%M"}.csv" +    dir = context[:output_dir] || "log/importers" +    filepath = File.join dir, "#{self.configuration_name}_#{Time.now.strftime "%y%m%d%H%M"}.csv"      # for some reason, context[:csv].to_csv does not work      CSV.open(filepath, 'w') do |csv|        header = true  | 
