class Cany::Recipes::Sidekiq
This recipes installs Sidekiq
"Simple, efficient, background processing in Ruby"
Sidekiq
is registered as service and so automatically started. @see sidekiq.org/ The official website for more information. @note The recipe relies that 'sidekiq' is listed inside your Gemfile and
therefore installed via the 'bundler' recipe.
@!attribute queues
@return [Array<String>, nil] An (optional) list of queue names sidekiq should listen on
@!attribute user
@return [String, nil] The user name as which the sidekiq process should executed
@!attribute group
@return [String, nil] The group name as which the sidekiq process should executed
Attributes
group[RW]
queues[RW]
user[RW]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
Cany::Recipe::new
# File lib/cany/recipes/sidekiq.rb, line 24 def initialize(*args) @queues = [] @user = 'www-data' @group = 'www-data' super end
Public Instance Methods
binary()
click to toggle source
# File lib/cany/recipes/sidekiq.rb, line 38 def binary install_service name, %W(/usr/bin/#{spec.name} sidekiq) + sidekiq_args, user: user, group: group inner.binary end
sidekiq_args()
click to toggle source
# File lib/cany/recipes/sidekiq.rb, line 43 def sidekiq_args args = %w(--environment production) queues.each do |queue| args << '--queue' args << queue.to_s end args end