mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-06 11:10:08 +00:00
16 lines
398 B
Ruby
16 lines
398 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Gitlab
|
|
module Database
|
|
module AsyncConstraints
|
|
DEFAULT_ENTRIES_PER_INVOCATION = 2
|
|
|
|
def self.validate_pending_entries!(how_many: DEFAULT_ENTRIES_PER_INVOCATION)
|
|
PostgresAsyncConstraintValidation.ordered.limit(how_many).each do |record|
|
|
AsyncConstraints::Validators.for(record).perform
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|