Sha256: 17d6db7d06c4fb95e492b63c25997341999bdbc54a1463ed3d3f2d4aa5d73419

Contents?: true

Size: 507 Bytes

Versions: 15

Compression:

Stored size: 507 Bytes

Contents

class ImportResult < ActiveRecord::Base
  belongs_to :import
  enum status: [ :starting, :running, :finishing, :finished, :stalled, :aborted ]
  serialize :found_listing_keys
  serialize :removed_listing_keys
  serialize :snapshots
  
  def found_count_difference
    previous_run = self.import.import_results.where(['start_time < ?', self.start_time]).order("start_time DESC").limit(1).first
    previous_run.present? ? self.found_listing_keys.count - previous_run.found_listing_keys.count : nil
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
reso-0.1.6.7 app/models/import_result.rb
reso-0.1.6.6 app/models/import_result.rb
reso-0.1.6.5 app/models/import_result.rb
reso-0.1.6.4 app/models/import_result.rb
reso-0.1.6.3 app/models/import_result.rb
reso-0.1.6.2 app/models/import_result.rb
reso-0.1.6.1 app/models/import_result.rb
reso-0.1.6 app/models/import_result.rb
reso-0.1.5.11 app/models/import_result.rb
reso-0.1.5.10 app/models/import_result.rb
reso-0.1.5.9 app/models/import_result.rb
reso-0.1.5.7 app/models/import_result.rb
reso-0.1.5.6 app/models/import_result.rb
reso-0.1.5.5 app/models/import_result.rb
reso-0.1.5.4 app/models/import_result.rb