debian-mirror-gitlab/lib/gitlab/database/async_foreign_keys.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
389 B
Ruby
Raw Normal View History

2023-04-23 21:23:45 +05:30
# frozen_string_literal: true
module Gitlab
module Database
module AsyncForeignKeys
DEFAULT_ENTRIES_PER_INVOCATION = 2
def self.validate_pending_entries!(how_many: DEFAULT_ENTRIES_PER_INVOCATION)
PostgresAsyncForeignKeyValidation.ordered.limit(how_many).each do |record|
ForeignKeyValidator.new(record).perform
end
end
end
end
end