diff options
Diffstat (limited to 'app/models/bulk_import.rb')
-rw-r--r-- | app/models/bulk_import.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/bulk_import.rb b/app/models/bulk_import.rb index a7ace7429d7..3381ff881f1 100644 --- a/app/models/bulk_import.rb +++ b/app/models/bulk_import.rb @@ -16,7 +16,8 @@ class BulkImport < ApplicationRecord enum source_type: { gitlab: 0 } - scope :stale, -> { where('created_at < ?', 8.hours.ago).where(status: [0, 1]) } + scope :stale, -> { where('updated_at < ?', 24.hours.ago).where(status: [0, 1]) } + scope :order_by_updated_at_and_id, ->(direction) { order(updated_at: direction, id: :asc) } scope :order_by_created_at, ->(direction) { order(created_at: direction) } state_machine :status, initial: :created do |