0
0
Ruby on Railsframework~10 mins

Sidekiq adapter setup in Ruby on Rails - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set Sidekiq as the Active Job queue adapter in Rails.

Ruby on Rails
Rails.application.config.active_job.queue_adapter = :[1]
Drag options to blanks, or click blank then click option'
Adelayed_job
Bque
Cresque
Dsidekiq
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of a symbol (e.g., 'sidekiq' instead of :sidekiq).
Using the wrong adapter name like 'delayed_job'.
2fill in blank
medium

Complete the initializer code to require Sidekiq in a Rails app.

Ruby on Rails
require '[1]'
Drag options to blanks, or click blank then click option'
Asidekiq
Bresque
Cdelayed_job
Dactive_job
Attempts:
3 left
💡 Hint
Common Mistakes
Requiring the wrong gem like 'resque' or 'delayed_job'.
Forgetting to require Sidekiq before configuration.
3fill in blank
hard

Fix the error in this Sidekiq configuration line to set concurrency to 10.

Ruby on Rails
Sidekiq.configure_server do |config|
  config.[1] = 10
end
Drag options to blanks, or click blank then click option'
Aconcurrency
Bmax_threads
Cworker_count
Dthread_pool_size
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect keys like 'max_threads' or 'worker_count'.
Misspelling 'concurrency'.
4fill in blank
hard

Fill both blanks to configure Sidekiq client and server with Redis URL.

Ruby on Rails
Sidekiq.configure_[1] do |config|
  config.redis = { url: 'redis://localhost:6379/0' }
end

Sidekiq.configure_[2] do |config|
  config.redis = { url: 'redis://localhost:6379/0' }
end
Drag options to blanks, or click blank then click option'
Aserver
Bclient
Cworker
Dprocessor
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same configuration block for both client and server.
Using incorrect block names like 'worker' or 'processor'.
5fill in blank
hard

Fill all three blanks to create a Sidekiq worker class that performs a job.

Ruby on Rails
class [1]Worker
  include Sidekiq::Worker

  def [2](name)
    puts "Hello, [3]!"
  end
end
Drag options to blanks, or click blank then click option'
AGreeting
Bperform
Cname
Dexecute
Attempts:
3 left
💡 Hint
Common Mistakes
Naming the method other than 'perform'.
Using wrong argument names.
Omitting 'include Sidekiq::Worker'.