-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#84] config 기반 실행 구현 #88
Conversation
fix: not null and default
)] | ||
pub host: String, | ||
#[clap(name = "config", long, help = "config file path")] | ||
pub config: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config 파일을 넘겨서 실행하는 형태로 정리
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
없으면 OS별 기본 config 경로를 사용
pub const DEFAULT_CONFIG_BASEPATH: &str = "C:\\Program Files\\rrdb"; | ||
|
||
// #[cfg(target_os = "macos")] | ||
// TODO: MacOS 경로 추가 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
플랫폼별 처리 로직을 일단 상수로 정리
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그리고 별도 디렉터리가 필요한 사이즈는 아니라서 정리 차원에서 파일로 내림
@@ -11,7 +11,7 @@ impl Executor { | |||
pub async fn get_table_config(&self, table_name: TableName) -> Result<TableConfig, RRDBError> { | |||
let encoder = StorageEncoder::new(); | |||
|
|||
let base_path = self.get_base_path(); | |||
let base_path = self.get_data_directory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이젠 전반적으로 data directory를 직접 가져와서 거기다 저장하는 형태로 변경
(data directory는 설정하기에 따라서 유동적으로 변경할 수 있어야 함)
@@ -13,12 +16,14 @@ use tokio::sync::mpsc; | |||
use super::client::ClientInfo; | |||
|
|||
pub struct Server { | |||
pub option: ServerOption, | |||
pub config: Arc<GlobalConfig>, | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
설정 정보들은 서버가 들고 있다가 executor에게 전달해줘야함 (data directory 등의 정보를 전달하기 위함)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good
resolved: #84
설명
일부 기능 구현 및 개선, 리팩토링