Class: Karafka::Cli::Swarm
Overview
Starts swarm of consumers forked from the supervisor
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call ⇒ Object
Starts the swarm.
Methods inherited from Base
aliases, commands, desc, #initialize, load, name, names, option, parse_options
Methods included from Helpers::Colorize
Constructor Details
This class inherits a constructor from Karafka::Cli::Base
Instance Method Details
#call ⇒ Object
Starts the swarm
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/karafka/cli/swarm.rb', line 15 def call ::Karafka::Swarm.ensure_supported! # Print our banner and info in the dev mode print_marketing_info if Karafka::App.env.development? # This will register inclusions and exclusions in the routing, so all forks will use it server = Server.new server.register_inclusions server.register_exclusions Karafka::Server.execution_mode = :supervisor Karafka::Swarm::Supervisor.new.run end |