Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nullchinchilla committed Mar 9, 2024
1 parent f29dbf3 commit 4fd8a4d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build_and_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,22 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-registry

- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-git

- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-cargo-build-target

- name: Build geph5-exit
run: cargo build --locked --release --target x86_64-unknown-linux-musl --manifest-path binaries/geph5-exit/Cargo.toml

- name: Build geph5-bridge
run: cargo build --locked --release --target x86_64-unknown-linux-musl --manifest-path binaries/geph5-bridge/Cargo.toml
Expand Down
2 changes: 1 addition & 1 deletion binaries/geph5-broker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ blake3 = "1.5.0"
isocountry = "0.3.2"
ed25519-dalek = "2.1.1"
tokio = { version = "1.0", features = ["full"] }
tracing-subscriber = "0.3.18"
tracing-subscriber = {version="0.3.18", features=["fmt"]}
nanorpc-sillad={path="../../libraries/nanorpc-sillad"}
sillad={path="../../libraries/sillad"}
sillad-sosistab3={path="../../libraries/sillad-sosistab3"}
10 changes: 9 additions & 1 deletion binaries/geph5-broker/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use rpc_impl::BrokerImpl;
use serde::Deserialize;
use smolscale::immortal::{Immortal, RespawnStrategy};
use std::{fs, net::SocketAddr, path::PathBuf};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};

mod database;
mod routes;
Expand Down Expand Up @@ -40,7 +41,14 @@ struct CliArgs {

#[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt::init();
tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().compact())
.with(
EnvFilter::builder()
.with_default_directive("geph5_broker".parse()?)
.from_env_lossy(),
)
.init();
// Parse the command-line arguments
let args: CliArgs = argh::from_env();

Expand Down
7 changes: 1 addition & 6 deletions binaries/geph5-client/src/exit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,7 @@ impl ExitConstraint {

let bridge_dialer = route_to_dialer(&bridge_routes);

Ok((
pubkey,
direct_dialer
.race(bridge_dialer.delay(Duration::from_millis(200)))
.dynamic(),
))
Ok((pubkey, direct_dialer.race(bridge_dialer).dynamic()))
}
}

Expand Down

0 comments on commit 4fd8a4d

Please sign in to comment.