Sha256: 35f9e763ed82de75e6ed2e906f5e9cb0f39f0a59123686fd5970a00a27321767

Contents?: true

Size: 338 Bytes

Versions: 7

Compression:

Stored size: 338 Bytes

Contents

# frozen_string_literal: true

class RandomRaiseWorker
  include Sidekiq::Worker

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

  def perform(raise_sample = 0.5)
    raise_sample = params[:raise_sample] || 0.5
    raise ArgumentError, "For no good Reason I raised with %#{raise_sample}" if rand > raise_sample
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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