Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/bulk_import.rb')
-rw-r--r--app/models/bulk_import.rb3
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