# typed: strict
class SuppressedJob < T::ImmutableStruct
  extend T::Sig
  include T::Struct::ActsAsComparable

  const :job_class, T.class_of(Scraper::JobBase)
  const :params, T::Hash[Symbol, T.untyped]

  sig { params(job: DeferredJob).returns(T::Boolean) }
  def matches?(job)
    job.job_class == job_class &&
      params.all? { |key, value| job.params[key] == value }
  end
end
