fix: pass RUST_LOG down to tycho-indexer
This commit is contained in:
@@ -28,7 +28,7 @@ services:
|
||||
db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
RUST_LOG: "info"
|
||||
RUST_LOG: "protocol_testing=info"
|
||||
DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0
|
||||
RPC_URL: "${RPC_URL}"
|
||||
SUBSTREAMS_API_TOKEN: "${SUBSTREAMS_API_TOKEN}"
|
||||
|
||||
@@ -37,7 +37,7 @@ impl TychoRunner {
|
||||
dotenv().ok();
|
||||
|
||||
let mut cmd = Command::new("tycho-indexer");
|
||||
cmd.env("RUST_LOG", "tycho_indexer=info");
|
||||
cmd.env("RUST_LOG", std::env::var("RUST_LOG").unwrap_or("tycho_indexer=info".to_string()));
|
||||
|
||||
let all_accounts = self.initialized_accounts.clone();
|
||||
|
||||
@@ -113,13 +113,14 @@ impl TychoRunner {
|
||||
|
||||
// Start the RPC server in a separate thread
|
||||
let rpc_thread = thread::spawn(move || {
|
||||
let binary_path = "tycho-indexer";
|
||||
|
||||
let mut cmd = Command::new(binary_path)
|
||||
let mut cmd = Command::new("tycho-indexer")
|
||||
.args(["--database-url", db_url.as_str(), "rpc"])
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
.env("RUST_LOG", "info")
|
||||
.env(
|
||||
"RUST_LOG",
|
||||
std::env::var("RUST_LOG").unwrap_or("tycho_indexer=info".to_string()),
|
||||
)
|
||||
.spawn()
|
||||
.expect("Failed to start RPC server");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user