Skip to content

Commit

Permalink
Set interval in env
Browse files Browse the repository at this point in the history
  • Loading branch information
akamya997 committed Jan 18, 2024
1 parent 90e55bf commit 0c356b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions judger/src/client/environment/.env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
BASE_URL="http://localhost:8080/api/v1/judge"
INTERVAL=10
RUST_LOG=DEBUG
3 changes: 3 additions & 0 deletions judger/src/client/environment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pub struct JudgeClientOpt {
/// Port to listen to
#[structopt(env = "BASE_URL", default_value = "http://localhost:8080/api/v1/judge")]
pub base_url: String,

#[structopt(env = "INTERVAL", default_value = "10")]
pub interval: i32,
}

pub fn load_option() -> JudgeClientOpt {
Expand Down

0 comments on commit 0c356b0

Please sign in to comment.