batch_processor
¶
Batch processing functionality for Music Genre Updater.
BatchProcessor
¶
Handles batch processing of multiple artists.
Initialize batch processor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
music_updater
|
MusicUpdater
|
Music updater instance |
required |
console_logger
|
Logger
|
Console logger |
required |
error_logger
|
Logger
|
Error logger |
required |
Source code in src/app/features/batch/batch_processor.py
process_from_file
async
¶
Process artists from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_path
|
str
|
Path to a file with artist names |
required |
operation
|
str
|
Operation to perform (clean, years, full) |
'full'
|
force
|
bool
|
Force processing |
False
|
Returns:
| Type | Description |
|---|---|
dict[str, list[str]]
|
Dictionary with successful and failed artists |
Source code in src/app/features/batch/batch_processor.py
process_artists
async
¶
Process a list of artists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artists
|
list[str]
|
List of artist names to process |
required |
operation
|
str
|
Operation to perform (clean, years, full) |
'full'
|
force
|
bool
|
Force processing (used for year updates) |
False
|
Returns:
| Type | Description |
|---|---|
dict[str, list[str]]
|
Dictionary with successful and failed artists |
Source code in src/app/features/batch/batch_processor.py
print_summary
¶
Print batch processing summary.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
dict[str, list[str]]
|
Processing results |
required |
total
|
int
|
Total number of artists |
required |