mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
edenapi_server: use LoadMiddleware
Summary: Use `LoadMiddleware` to track the number of outstanding requests in the server. Reviewed By: DurhamG Differential Revision: D23298415 fbshipit-source-id: bdcdb0f657d8deac593d356c87ac0d8d3f39e322
This commit is contained in:
parent
7144363d2c
commit
96a6a3fcfb
@ -35,7 +35,10 @@ use cmdlib::{
|
||||
use fbinit::FacebookInit;
|
||||
use gotham_ext::{
|
||||
handler::MononokeHttpHandler,
|
||||
middleware::{ClientIdentityMiddleware, ServerIdentityMiddleware, TlsSessionDataMiddleware},
|
||||
middleware::{
|
||||
ClientIdentityMiddleware, LoadMiddleware, PostRequestMiddleware, ServerIdentityMiddleware,
|
||||
TlsSessionDataMiddleware,
|
||||
},
|
||||
socket_data::TlsSocketData,
|
||||
};
|
||||
use mononoke_api::Mononoke;
|
||||
@ -153,7 +156,9 @@ async fn start(
|
||||
.add(ServerIdentityMiddleware::new(HeaderValue::from_static(
|
||||
"edenapi_server",
|
||||
)))
|
||||
.add(PostRequestMiddleware::default())
|
||||
.add(RequestContextMiddleware::new(fb, logger.clone()))
|
||||
.add(LoadMiddleware::new())
|
||||
.build(router);
|
||||
|
||||
// Set up socket and TLS acceptor that this server will listen on.
|
||||
|
Loading…
Reference in New Issue
Block a user