monitor
CLI module for monitoring Merlin workflows and maintaining active allocations.
This module provides the MonitorCommand class, which implements the monitor
subcommand in the Merlin CLI. The purpose of the monitor command is to
periodically check the status of workflow tasks and worker activity to ensure
the allocation (e.g., on a computing cluster) remains alive while jobs are
in progress.
MonitorCommand
Bases: CommandEntryPoint
Handles monitor CLI command for monitoring workflows to ensure the allocation remains alive.
Methods:
| Name | Description |
|---|---|
add_parser |
Adds the |
process_command |
Processes the CLI input and dispatches the appropriate action. |
Source code in merlin/cli/commands/monitor.py
add_parser(subparsers)
Add the monitor 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/monitor.py
process_command(args)
CLI command to monitor Merlin workers and queues to maintain allocation status.
This function periodically checks the status of Merlin workers and the associated queues to ensure that the allocation remains active. It includes a sleep interval to wait before each check, including the initial one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
Parsed command-line arguments, which may include:
|
required |