Class: Vx::Worker::CLI
- Inherits:
-
Object
- Object
- Vx::Worker::CLI
- Includes:
- Common::EnvFile, Helper::Config, Helper::Logger
- Defined in:
- lib/vx/worker/cli.rb
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Methods included from Helper::Logger
Methods included from Helper::Config
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
13 14 15 16 17 |
# File 'lib/vx/worker/cli.rb', line 13 def initialize @options = {} parse! Worker.initialize! end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/vx/worker/cli.rb', line 19 def run trap('INT') { Thread.new do Vx::Common::AMQP.shutdown end.join } Vx::Common::AMQP::Supervisor::Threaded.build( Vx::Worker::JobsConsumer => config.workers, ).run end |