Sha256: 71d8a379b55a860afbf0e068f202add7f2b41fb2c4e5288d696dfa5a65cfafe5

Contents?: true

Size: 752 Bytes

Versions: 6

Compression:

Stored size: 752 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.1.0
class Sidekiq::Portal::Job
  require_relative 'job/builder'

  # @return [Class]
  #
  # @api public
  # @since 0.1.0
  attr_reader :klass

  # @return [Sidekiq::Portal::JobManager::Timeline]
  #
  # @api private
  # @since 0.1.0
  attr_reader :timeline

  # @param klass [Class] Sidekiq-based ActiveJob class
  # @param timeline [Sidekiq::Portal::Job]
  # @retunr [void]
  #
  # @api private
  # @since 0.1.0
  def initialize(klass, timeline)
    @klass = klass
    @timeline = timeline
    @lock = Sidekiq::Portal::Lock.new
  end

  private

  # @param block [Block]
  # @return [Any]
  #
  # @api private
  # @since 0.1.0
  def thread_safe(&block)
    @lock.thread_safe(&block)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sidekiq_portal-0.3.2 lib/portal/job.rb
sidekiq_portal-0.3.1 lib/portal/job.rb
sidekiq_portal-0.3.0 lib/portal/job.rb
sidekiq_portal-0.2.0 lib/portal/job.rb
sidekiq_portal-0.1.1 lib/portal/job.rb
sidekiq_portal-0.1.0 lib/portal/job.rb