Skip to content

Commit

Permalink
more changes from #1844
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamka1 committed Nov 4, 2024
1 parent 10db07b commit 7fbdf67
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions raphtory-graphql/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use raphtory_graphql::{config::app_config::AppConfigBuilder, GraphServer};
use raphtory_graphql::{config::app_config::AppConfigBuilder, server::DEFAULT_PORT, GraphServer};
use std::{
env,
path::{Path, PathBuf},
Expand All @@ -9,6 +9,7 @@ use tokio::io::Result as IoResult;
async fn main() -> IoResult<()> {
let default_path = Path::new("/tmp/graphs");

let port: u16 = env::var("PORT").map(|port| port.parse().unwrap()).unwrap_or(DEFAULT_PORT);
let work_dir = env::var("GRAPH_DIRECTORY").unwrap_or(default_path.display().to_string());
let work_dir = PathBuf::from(&work_dir);

Expand All @@ -17,13 +18,13 @@ async fn main() -> IoResult<()> {
.with_cache_capacity(30)
.with_cache_tti_seconds(900)
.with_log_level("DEBUG".to_string())
.with_tracing(true)
.with_tracing(false)
.with_otlp_agent_host("http://localhost".to_string())
.with_otlp_agent_port("4317".to_string())
.with_otlp_tracing_service_name("Raphtory".to_string())
.build(),
);

GraphServer::new(work_dir, app_config, None)?.run().await?;
GraphServer::new(work_dir, app_config, None)?.run_with_port(port).await?;
Ok(())
}

0 comments on commit 7fbdf67

Please sign in to comment.