Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
cncases committed Oct 28, 2024
1 parent ded0014 commit ce138e4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
/search_index
/rocksdb
裁判文书全量数据(已完成)
裁判文书全量数据(已完成)
/fjall
21 changes: 10 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tantivy = "0.22.0"
tantivy-jieba = "0.11.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tower = "0.5.1"
tower-http = { version = "0.6.1", features = ["compression-zstd", "trace", "timeout"] }
tower-http = { version = "0.6.1", features = ["compression-zstd", "timeout"] }
tracing = { version = "0.1", features = ["release_max_level_info", "max_level_info"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
zip = { version = "2.2.0", default-features = false, features = ["deflate"] }
Expand Down
9 changes: 2 additions & 7 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ use fjall::Config;
use std::{net::SocketAddr, sync::Arc, time::Duration};
use tokio::net::TcpListener;
use tower::ServiceBuilder;
use tower_http::{
compression::CompressionLayer,
timeout::TimeoutLayer,
trace::{DefaultMakeSpan, TraceLayer},
};
use tracing::{info, Level};
use tower_http::{compression::CompressionLayer, timeout::TimeoutLayer};
use tracing::info;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

#[tokio::main]
Expand All @@ -30,7 +26,6 @@ async fn main() {

let middleware_stack = ServiceBuilder::new()
.layer(CompressionLayer::new())
.layer(TraceLayer::new_for_http().make_span_with(DefaultMakeSpan::new().level(Level::INFO)))
.layer(TimeoutLayer::new(Duration::from_secs(10)));

let app = Router::new()
Expand Down

0 comments on commit ce138e4

Please sign in to comment.