Sha256: 22cc12ae861d4839e80f7daab7aa5fd2dd04d6110c77e0276ce5cd2e9c35eb68

Contents?: true

Size: 381 Bytes

Versions: 7

Compression:

Stored size: 381 Bytes

Contents

# frozen_string_literal: true

class ExcludeHardWorker
  include Sidekiq::Worker

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

  DEFAULT_SLEEP = 10.seconds

  def perform(sleep_seconds = DEFAULT_SLEEP)
    Sidekiq.logger.info "I am a harrrddddd worker. I go nap for #{sleep_seconds} seconds"
    sleep(sleep_seconds)
    Sidekiq.logger.info "Good nap"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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