Wire thread count and error behavior settings into executor

The PipelineExecutor now stores thread_count and pause_on_error
fields. When pause_on_error is enabled, the executor sets the
pause flag on failures so the user can review errors. The GUI
reads these settings from AppConfig before starting processing.
This commit is contained in:
2026-03-06 13:52:08 +02:00
parent be081307c4
commit abd794b3b9
2 changed files with 34 additions and 1 deletions

View File

@@ -1219,8 +1219,16 @@ fn run_processing(_window: &adw::ApplicationWindow, ui: &WizardUi) {
let cancel = cancel_flag.clone();
let pause = pause_flag.clone();
// Load processing settings from config
let cfg_store = pixstrip_core::storage::ConfigStore::new();
let app_cfg = cfg_store.load().unwrap_or_default();
std::thread::spawn(move || {
let executor = pixstrip_core::executor::PipelineExecutor::with_cancel_and_pause(cancel, pause);
let mut executor = pixstrip_core::executor::PipelineExecutor::with_cancel_and_pause(cancel, pause);
match app_cfg.thread_count {
pixstrip_core::config::ThreadCount::Auto => executor.set_thread_count(0),
pixstrip_core::config::ThreadCount::Manual(n) => executor.set_thread_count(n),
}
executor.set_pause_on_error(app_cfg.error_behavior == pixstrip_core::config::ErrorBehavior::PauseOnError);
let result = executor.execute(&job, |update| {
let _ = tx.send(ProcessingMessage::Progress {
current: update.current,