Sha256: e9a15494e76fcf88e85ab0211c62093ce07c454fca23d428b8ae731b8ead40a1

Contents?: true

Size: 281 Bytes

Versions: 7

Compression:

Stored size: 281 Bytes

Contents

# frozen_string_literal: true

class ExcludeRandomRaiseWorker
  include Sidekiq::Worker

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

  def perform(threshold = 0.5)
    raise StandardError, "Yikes. Unlucky. I decided to raise" if rand > threshold.to_f
  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_random_raise_worker.rb
sidekiq-web_custom-0.5.0 dummy_rails/app/workers/exclude_random_raise_worker.rb
sidekiq-web_custom-0.4.1 dummy_rails/app/workers/exclude_random_raise_worker.rb
sidekiq-web_custom-0.4.0 dummy_rails/app/workers/exclude_random_raise_worker.rb
sidekiq-web_custom-0.3.1 dummy_rails/app/workers/exclude_random_raise_worker.rb
sidekiq-web_custom-0.3.0 dummy_rails/app/workers/exclude_random_raise_worker.rb
sidekiq-web_custom-0.2.0 dummy_rails/app/workers/exclude_random_raise_worker.rb