Skip to content

Commit 0238611

Browse files
committed
feat: added configurable update intercal
1 parent dbadeca commit 0238611

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

crates/base/src/config.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ pub struct AdapterConfig {
6161
///
6262
/// The Variant of Draco. E.g. Http, Cron...
6363
pub draco_variant: String,
64+
65+
/// Adapter Status Update Interval Seconds
66+
///
67+
/// Interval for runtime status heartbeat updates while the adapter is running.
68+
/// Set to 0 to disable periodic heartbeat updates.
69+
pub adapter_status_update_interval_seconds: u64,
6470
}
6571

6672
impl AdapterConfig {
@@ -93,6 +99,10 @@ impl AdapterConfig {
9399

94100
let draco_variant =
95101
code0_flow::flow_config::env_with_default("DRACO_VARIANT", String::from("None"));
102+
let adapter_status_update_interval_seconds = code0_flow::flow_config::env_with_default(
103+
"ADAPTER_STATUS_UPDATE_INTERVAL_SECONDS",
104+
30_u64,
105+
);
96106
Self {
97107
environment,
98108
nats_bucket,
@@ -105,6 +115,7 @@ impl AdapterConfig {
105115
definition_path,
106116
with_health_service,
107117
draco_variant,
118+
adapter_status_update_interval_seconds,
108119
}
109120
}
110121

0 commit comments

Comments
 (0)