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

Configuration for cleanup scheduling. More...

#include <task_scheduler_config.h>

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

Public Member Functions

auto retention_for (const std::string &modality) const -> std::chrono::days
 Get retention period for a modality.
 

Public Attributes

std::chrono::days default_retention {365}
 Default retention period.
 
std::map< std::string, std::chrono::days > modality_retention
 Modality-specific retention periods.
 
std::set< std::string > exclude_patterns
 Study description patterns to exclude from cleanup.
 
bool verify_not_locked {true}
 Verify study is not locked before deletion.
 
bool dry_run {false}
 Perform dry run (report only, no deletion)
 
std::size_t max_deletions_per_cycle {100}
 Maximum studies to delete per cycle.
 
bool database_only {false}
 Delete from database only (keep files)
 
schedule cleanup_schedule {cron_schedule::daily_at(2, 0)}
 Schedule for cleanup task.
 

Detailed Description

Configuration for cleanup scheduling.

Definition at line 346 of file task_scheduler_config.h.

Member Function Documentation

◆ retention_for()

auto kcenon::pacs::workflow::cleanup_config::retention_for ( const std::string & modality) const -> std::chrono::days
inlinenodiscard

Get retention period for a modality.

Parameters
modalityDICOM modality code
Returns
Retention period (modality-specific or default)

Definition at line 376 of file task_scheduler_config.h.

377 {
378 auto it = modality_retention.find(modality);
379 return it != modality_retention.end() ? it->second : default_retention;
380 }
std::map< std::string, std::chrono::days > modality_retention
Modality-specific retention periods.
std::chrono::days default_retention
Default retention period.

Member Data Documentation

◆ cleanup_schedule

schedule kcenon::pacs::workflow::cleanup_config::cleanup_schedule {cron_schedule::daily_at(2, 0)}

Schedule for cleanup task.

Definition at line 369 of file task_scheduler_config.h.

369{cron_schedule::daily_at(2, 0)}; // 2:00 AM
static auto daily_at(int hour, int minute=0) -> cron_schedule
Create a daily schedule at specific time.

◆ database_only

bool kcenon::pacs::workflow::cleanup_config::database_only {false}

Delete from database only (keep files)

Definition at line 366 of file task_scheduler_config.h.

366{false};

◆ default_retention

std::chrono::days kcenon::pacs::workflow::cleanup_config::default_retention {365}

Default retention period.

Definition at line 348 of file task_scheduler_config.h.

348{365};

◆ dry_run

bool kcenon::pacs::workflow::cleanup_config::dry_run {false}

Perform dry run (report only, no deletion)

Definition at line 360 of file task_scheduler_config.h.

360{false};

◆ exclude_patterns

std::set<std::string> kcenon::pacs::workflow::cleanup_config::exclude_patterns

Study description patterns to exclude from cleanup.

Definition at line 354 of file task_scheduler_config.h.

◆ max_deletions_per_cycle

std::size_t kcenon::pacs::workflow::cleanup_config::max_deletions_per_cycle {100}

Maximum studies to delete per cycle.

Definition at line 363 of file task_scheduler_config.h.

363{100};

◆ modality_retention

std::map<std::string, std::chrono::days> kcenon::pacs::workflow::cleanup_config::modality_retention

Modality-specific retention periods.

Definition at line 351 of file task_scheduler_config.h.

◆ verify_not_locked

bool kcenon::pacs::workflow::cleanup_config::verify_not_locked {true}

Verify study is not locked before deletion.

Definition at line 357 of file task_scheduler_config.h.

357{true};

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