debian-mirror-gitlab/lib/gitlab/background_migration/batching_strategies/dismissed_vulnerabilities_strategy.rb
2022-08-13 15:12:31 +05:30

17 lines
564 B
Ruby

# frozen_string_literal: true
module Gitlab
module BackgroundMigration
module BatchingStrategies
# Batching class to use for setting state in vulnerabilitites table.
# Batches will be scoped to records where the dismissed_at is set.
#
# If no more batches exist in the table, returns nil.
class DismissedVulnerabilitiesStrategy < PrimaryKeyBatchingStrategy
def apply_additional_filters(relation, job_arguments: [], job_class: nil)
relation.where.not(dismissed_at: nil)
end
end
end
end
end