debian-mirror-gitlab/lib/gitlab/database/async_constraints.rb
2023-05-27 22:25:52 +05:30

15 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