Wire thread count and error behavior settings into executor

This commit is contained in:
2026-03-06 13:52:08 +02:00
parent b54e0545b0
commit ded1880711
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,