Class: Karafka::Cli::Worker
Overview
Worker Karafka Cli action
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(*params) ⇒ Object
Start the Karafka Sidekiq worker.
Methods inherited from Base
bind_to, desc, #initialize, option
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Instance Method Details
#call(*params) ⇒ Object
Start the Karafka Sidekiq worker
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/karafka/cli/worker.rb', line 12 def call(*params) puts 'Starting Karafka worker' config = "-C #{Karafka::App.root.join('config/sidekiq.yml')}" req = "-r #{Karafka.boot_file}" env = "-e #{Karafka.env}" cli.info cmd = "bundle exec sidekiq #{env} #{req} #{config} #{params.join(' ')}" puts(cmd) exec(cmd) end |