stop_workers
CLI module for shutting down Merlin workers.
This module defines the StopWorkersCommand class, which handles the stop-workers
subcommand in the Merlin CLI. It provides functionality to stop running workers that
are connected to a task server such as Celery.
StopWorkersCommand
Bases: CommandEntryPoint
Handles stop-workers CLI command for shutting down Merlin workers.
Methods:
| Name | Description |
|---|---|
add_parser |
Adds the |
process_command |
Processes the CLI input and dispatches the appropriate action. |
Source code in merlin/cli/commands/stop_workers.py
add_parser(subparsers)
Add the stop-workers command parser to the CLI argument parser.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subparsers
|
ArgumentParser
|
The subparsers object to which the |
required |
Source code in merlin/cli/commands/stop_workers.py
process_command(args)
CLI command for stopping all workers.
This function stops any active workers connected to a user's task server.
If the --spec argument is provided, this function retrieves the names of
workers from a the spec file and then issues a command to stop them.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
Parsed command-line arguments, which may include:
|
required |