GUI: abgebrochenen oder teils ausgefallenen Batch fortsetzen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 19:25:25 +01:00
parent 52b13bd269
commit e322a14030
3 changed files with 16 additions and 7 deletions

View File

@ -183,6 +183,7 @@ async fn discover_models(adapter: String, url: String, api_key_env: String) -> R
}
/// Startet einen Batch mit den angegebenen Modellen (Anzeigenamen) und Aufgaben-IDs.
/// Mit `batch_id` wird ein bestehender Batch fortgesetzt: fertige Läufe werden übersprungen.
/// Fortschritt kommt als Ereignis `batch-event`. Das Ergebnis ist die Zusammenfassung.
#[tauri::command]
async fn start_batch(
@ -194,6 +195,7 @@ async fn start_batch(
task_ids: Vec<String>,
repeats: u32,
note: String,
batch_id: Option<i64>,
) -> Result<BatchSummary, String> {
if models.is_empty() || task_ids.is_empty() {
return Err("Mindestens ein Modell und eine Aufgabe wählen.".into());
@ -262,7 +264,7 @@ async fn start_batch(
let on_event = |e: &Event| {
let _ = emitter.emit(EVENT_NAME, e);
};
runner::run_batch(&mut store, &run_cfg, None, &note, repeats, &jobs, &cancel, &on_event)
runner::run_batch(&mut store, &run_cfg, batch_id, &note, repeats, &jobs, &cancel, &on_event)
})
.await
.map_err(|e| format!("Batch-Thread abgebrochen: {e}"))?;