$io->
comment("The worker will automatically exit once it has {
$stopsWhen}."
);
} $io->
comment('Quit the worker with CONTROL-C.'
);
if (OutputInterface::VERBOSITY_VERBOSE >
$output->
getVerbosity()) { $io->
comment('Re-run the command with a -vv option to see logs about consumed messages.'
);
} $bus =
$input->
getOption('bus'
) ?
$this->routableBus->
getMessageBus($input->
getOption('bus'
)) :
$this->routableBus;
$worker =
new Worker($receivers,
$bus,
$this->eventDispatcher,
$this->logger,
$rateLimiters);
$options =
[ 'sleep' =>
$input->
getOption('sleep'
) * 1000000,
];
if ($queues =
$input->
getOption('queues'
)) { $options['queues'
] =
$queues;
} $worker->
run($options);
return 0;
}