Sha256: 7932c62fcef971e6edacfef050573603dfd7b6acd105220b98364c6029a0f328

Contents?: true

Size: 337 Bytes

Versions: 7

Compression:

Stored size: 337 Bytes

Contents

# frozen_string_literal: true

class HardWorker
  include Sidekiq::Worker

  sidekiq_options queue: File.basename(__FILE__,'.*').downcase

  DEFAULT_SLEEP = 10

  def perform(sleep_seconds = DEFAULT_SLEEP)
    Sidekiq.logger.info "Night Night for #{sleep_seconds}"
    sleep(sleep_seconds)
    Sidekiq.logger.info 'Back alive'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sidekiq-web_custom-0.6.0 dummy_rails/app/workers/hard_worker.rb
sidekiq-web_custom-0.5.0 dummy_rails/app/workers/hard_worker.rb
sidekiq-web_custom-0.4.1 dummy_rails/app/workers/hard_worker.rb
sidekiq-web_custom-0.4.0 dummy_rails/app/workers/hard_worker.rb
sidekiq-web_custom-0.3.1 dummy_rails/app/workers/hard_worker.rb
sidekiq-web_custom-0.3.0 dummy_rails/app/workers/hard_worker.rb
sidekiq-web_custom-0.2.0 dummy_rails/app/workers/hard_worker.rb