Fundamental_Analysis/services/report-generator-service/src/config.rs
Lv, Qi 70b30b39d8 Refactor: Complete transition from analysis_results to workflow_history
- Removed dependencies on analysis_results table
- Implemented workflow_history storage in Data Persistence Service
- Updated Workflow Orchestrator to save workflow snapshots to history
- Refactored Frontend to consume workflow_history and fetch reports via VGCS
- Fixed Data Providers (Tushare, YFinance) to report output paths in metadata
- Updated documentation and task status
2025-11-29 17:55:54 +08:00

29 lines
668 B
Rust

use serde::Deserialize;
#[derive(Debug, Deserialize, Clone)]
pub struct AppConfig {
pub server_port: u16,
pub nats_addr: String,
pub data_persistence_service_url: String,
pub workflow_data_path: String,
}
#[allow(dead_code)]
fn default_workflow_data_path() -> String {
"/app/data".to_string()
}
impl AppConfig {
pub fn load() -> Result<Self, config::ConfigError> {
let config = config::Config::builder()
.add_source(
config::Environment::default()
.separator("__")
.ignore_empty(true),
)
.build()?;
config.try_deserialize()
}
}