PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::workflow::task_scheduler_config Struct Reference

Configuration for the task scheduler service. More...

#include <task_scheduler_config.h>

Collaboration diagram for kcenon::pacs::workflow::task_scheduler_config:
Collaboration graph

Public Types

using task_complete_callback
 Callback when any task completes.
 
using task_error_callback
 Callback when any task fails.
 
using cycle_complete_callback
 Callback when scheduler cycle completes.
 

Public Member Functions

auto is_valid () const noexcept -> bool
 Check if configuration is valid.
 

Public Attributes

bool enabled {true}
 Enable/disable the scheduler service.
 
bool auto_start {false}
 Whether to start automatically on construction.
 
std::size_t max_concurrent_tasks {4}
 Maximum concurrent task executions.
 
std::chrono::seconds check_interval {60}
 Scheduler check interval (how often to check for due tasks)
 
std::string persistence_path
 Path to persist scheduled tasks (empty = no persistence)
 
bool restore_on_startup {true}
 Restore tasks from persistence on startup.
 
std::optional< cleanup_configcleanup
 Cleanup configuration.
 
std::optional< archive_configarchive
 Archive configuration.
 
std::optional< verification_configverification
 Verification configuration.
 
task_complete_callback on_task_complete
 
task_error_callback on_task_error
 
cycle_complete_callback on_cycle_complete
 

Detailed Description

Configuration for the task scheduler service.

Definition at line 473 of file task_scheduler_config.h.

Member Typedef Documentation

◆ cycle_complete_callback

Initial value:
std::function<void(std::size_t tasks_executed,
std::size_t tasks_succeeded,
std::size_t tasks_failed)>

Callback when scheduler cycle completes.

Definition at line 514 of file task_scheduler_config.h.

◆ task_complete_callback

Initial value:
std::function<void(const task_id& id,
const task_execution_record& record)>
std::string task_id
Unique task identifier.

Callback when any task completes.

Definition at line 502 of file task_scheduler_config.h.

◆ task_error_callback

Initial value:
std::function<void(const task_id& id,
const std::string& error)>

Callback when any task fails.

Definition at line 508 of file task_scheduler_config.h.

Member Function Documentation

◆ is_valid()

auto kcenon::pacs::workflow::task_scheduler_config::is_valid ( ) const -> bool
inlinenodiscardnoexcept

Check if configuration is valid.

Returns
true if configuration is valid for operation

Definition at line 524 of file task_scheduler_config.h.

524 {
525 return enabled && max_concurrent_tasks > 0;
526 }
std::size_t max_concurrent_tasks
Maximum concurrent task executions.
bool enabled
Enable/disable the scheduler service.

Member Data Documentation

◆ archive

std::optional<archive_config> kcenon::pacs::workflow::task_scheduler_config::archive

◆ auto_start

bool kcenon::pacs::workflow::task_scheduler_config::auto_start {false}

◆ check_interval

std::chrono::seconds kcenon::pacs::workflow::task_scheduler_config::check_interval {60}

Scheduler check interval (how often to check for due tasks)

Definition at line 484 of file task_scheduler_config.h.

484{60};

Referenced by kcenon::pacs::workflow::task_scheduler::run_loop(), and kcenon::pacs::workflow::task_scheduler::start().

◆ cleanup

std::optional<cleanup_config> kcenon::pacs::workflow::task_scheduler_config::cleanup

◆ enabled

bool kcenon::pacs::workflow::task_scheduler_config::enabled {true}

◆ max_concurrent_tasks

std::size_t kcenon::pacs::workflow::task_scheduler_config::max_concurrent_tasks {4}

Maximum concurrent task executions.

Definition at line 481 of file task_scheduler_config.h.

481{4};

Referenced by kcenon::pacs::workflow::task_scheduler::execute_cycle(), and kcenon::pacs::workflow::task_scheduler::start().

◆ on_cycle_complete

cycle_complete_callback kcenon::pacs::workflow::task_scheduler_config::on_cycle_complete

◆ on_task_complete

task_complete_callback kcenon::pacs::workflow::task_scheduler_config::on_task_complete

◆ on_task_error

task_error_callback kcenon::pacs::workflow::task_scheduler_config::on_task_error

◆ persistence_path

std::string kcenon::pacs::workflow::task_scheduler_config::persistence_path

◆ restore_on_startup

bool kcenon::pacs::workflow::task_scheduler_config::restore_on_startup {true}

Restore tasks from persistence on startup.

Definition at line 490 of file task_scheduler_config.h.

490{true};

Referenced by kcenon::pacs::workflow::task_scheduler::task_scheduler(), and kcenon::pacs::workflow::task_scheduler::task_scheduler().

◆ verification

std::optional<verification_config> kcenon::pacs::workflow::task_scheduler_config::verification

The documentation for this struct was generated from the following file: