Sha256: 4655606aede3ce4186ad736cc9311f5bf30238eeacb38d1d32f35f3d45b20a4e
Contents?: true
Size: 993 Bytes
Versions: 83
Compression:
Stored size: 993 Bytes
Contents
# frozen_string_literal: true module Karafka module Routing module Features class ActiveJob < Base # Topic extensions to be able to check if given topic is ActiveJob topic module Topic # @param active [Boolean] should this topic be considered one working with ActiveJob # # @note Since this feature supports only one setting (active), we can use the old API # where the boolean would be an argument def active_job(active = false) @active_job ||= Config.new(active: active) end # @return [Boolean] is this an ActiveJob topic def active_job? active_job.active? end # @return [Hash] topic with all its native configuration options plus active job # namespace settings def to_h super.merge( active_job: active_job.to_h ).freeze end end end end end end
Version data entries
83 entries across 83 versions & 1 rubygems