diff options
| author | Zog | 2018-03-06 10:16:07 +0100 | 
|---|---|---|
| committer | Zog | 2018-03-06 10:17:44 +0100 | 
| commit | facce065c8cf455ab6e1fe44c6d9394b4f2aaa42 (patch) | |
| tree | 27b9b0a4d8ca8920c69f17e230e87ea14000472f /app/models/simple_exporter.rb | |
| parent | cfdd12aa6b46331435bc62209c51cc14f470bd38 (diff) | |
| download | chouette-core-facce065c8cf455ab6e1fe44c6d9394b4f2aaa42.tar.bz2 | |
Refs #6068; Add aggregated output for multiple interfaces
Diffstat (limited to 'app/models/simple_exporter.rb')
| -rw-r--r-- | app/models/simple_exporter.rb | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/app/models/simple_exporter.rb b/app/models/simple_exporter.rb index c1ba75d0a..402d450f0 100644 --- a/app/models/simple_exporter.rb +++ b/app/models/simple_exporter.rb @@ -28,7 +28,7 @@ class SimpleExporter < SimpleInterface      self.status = :failed    ensure      @csv&.close -    self.save! +    task_finished    end    def collection @@ -52,8 +52,8 @@ class SimpleExporter < SimpleInterface    def process_collection      self.configuration.before_actions(:all).each do |action| action.call self end -    log "Starting export ...", color: :green -    log "Export will be written in #{filepath}", color: :green +    log "Starting export ..." +    log "Export will be written in #{filepath}"      @csv << self.configuration.columns.map(&:name)      if collection.is_a?(ActiveRecord::Relation) && collection.model.column_names.include?("id")        ids = collection.pluck :id @@ -87,6 +87,7 @@ class SimpleExporter < SimpleInterface      if val.nil? && !col.omit_nil?        push_in_journal({event: :attribute_not_found, message: "Value missing for: #{[col.scope, col.attribute].flatten.join('.')}", kind: :warning})        self.status ||= :success_with_warnings +      @new_status ||= colorize("✓", :orange)      end      if val.nil? && col.required? | 
