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

Scheduled task definition. More...

#include <task_scheduler_config.h>

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

Public Attributes

task_id id
 Unique task ID.
 
std::string name
 Human-readable task name.
 
std::string description
 Task description.
 
task_type type {task_type::custom}
 Task type.
 
schedule task_schedule
 Schedule for execution.
 
task_state state {task_state::pending}
 Current state.
 
task_callback_with_result callback
 Task callback.
 
bool enabled {true}
 Whether task is enabled.
 
int priority {0}
 Task priority (higher = more important)
 
std::set< std::string > tags
 Tags for categorization.
 
std::chrono::seconds timeout {0}
 Maximum execution time (0 = no limit)
 
std::size_t max_retries {0}
 Number of retry attempts on failure.
 
std::chrono::seconds retry_delay {60}
 Delay between retries.
 
std::chrono::system_clock::time_point created_at
 Creation time.
 
std::chrono::system_clock::time_point updated_at
 Last modification time.
 
std::optional< std::chrono::system_clock::time_point > next_run_at
 Next scheduled execution time.
 
std::optional< std::chrono::system_clock::time_point > last_run_at
 Last execution time.
 
std::optional< task_execution_recordlast_execution
 Last execution result.
 
std::size_t execution_count {0}
 Total execution count.
 
std::size_t success_count {0}
 Successful execution count.
 
std::size_t failure_count {0}
 Failed execution count.
 

Detailed Description

Scheduled task definition.

Definition at line 274 of file task_scheduler_config.h.

Member Data Documentation

◆ callback

◆ created_at

◆ description

◆ enabled

◆ execution_count

std::size_t kcenon::pacs::workflow::scheduled_task::execution_count {0}

Total execution count.

Definition at line 330 of file task_scheduler_config.h.

330{0};

◆ failure_count

std::size_t kcenon::pacs::workflow::scheduled_task::failure_count {0}

Failed execution count.

Definition at line 336 of file task_scheduler_config.h.

336{0};

◆ id

◆ last_execution

std::optional<task_execution_record> kcenon::pacs::workflow::scheduled_task::last_execution

Last execution result.

Definition at line 327 of file task_scheduler_config.h.

◆ last_run_at

std::optional<std::chrono::system_clock::time_point> kcenon::pacs::workflow::scheduled_task::last_run_at

Last execution time.

Definition at line 324 of file task_scheduler_config.h.

◆ max_retries

std::size_t kcenon::pacs::workflow::scheduled_task::max_retries {0}

Number of retry attempts on failure.

Definition at line 309 of file task_scheduler_config.h.

309{0};

◆ name

◆ next_run_at

std::optional<std::chrono::system_clock::time_point> kcenon::pacs::workflow::scheduled_task::next_run_at

Next scheduled execution time.

Definition at line 321 of file task_scheduler_config.h.

Referenced by kcenon::pacs::workflow::task_scheduler::schedule_once().

◆ priority

int kcenon::pacs::workflow::scheduled_task::priority {0}

◆ retry_delay

std::chrono::seconds kcenon::pacs::workflow::scheduled_task::retry_delay {60}

Delay between retries.

Definition at line 312 of file task_scheduler_config.h.

312{60};

◆ state

task_state kcenon::pacs::workflow::scheduled_task::state {task_state::pending}

Current state.

Definition at line 291 of file task_scheduler_config.h.

@ pending
Waiting for scheduled time.

◆ success_count

std::size_t kcenon::pacs::workflow::scheduled_task::success_count {0}

Successful execution count.

Definition at line 333 of file task_scheduler_config.h.

333{0};

◆ tags

std::set<std::string> kcenon::pacs::workflow::scheduled_task::tags

◆ task_schedule

◆ timeout

std::chrono::seconds kcenon::pacs::workflow::scheduled_task::timeout {0}

Maximum execution time (0 = no limit)

Definition at line 306 of file task_scheduler_config.h.

306{0};

◆ type

◆ updated_at


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