orchestrator
¶
Main orchestrator module for Music Genre Updater.
This module handles the high-level coordination of all operations.
MusicAppNotRunningError
¶
Bases: Exception
Music.app is closed, so a command that needs it cannot run.
This is a normal state for scheduled runs, not a failure: the caller should skip the run and try again later.
Source code in src/app/orchestrator.py
Orchestrator
¶
Orchestrates the entire music update workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
COMMANDS_BYPASSING_MUSIC_CHECK |
set[str]
|
Commands that skip the Music.app running check. |
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deps
|
DependencyContainer
|
Dependency container with all required services |
required |
Source code in src/app/orchestrator.py
run_command
async
¶
Execute the appropriate command based on arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
Parsed command-line arguments from argparse. |
required |
Raises:
| Type | Description |
|---|---|
MusicAppNotRunningError
|
The command needs Music.app and it is not running. |