feat: allow manual table flush through HTTP API (#1184)

This commit is contained in:
Lei, HUANG
2023-03-15 20:15:34 +08:00
committed by GitHub
parent cd8be77968
commit 17eb99bc52
17 changed files with 239 additions and 33 deletions

View File

@@ -275,7 +275,8 @@ pub async fn setup_test_http_app(store_type: StorageType, name: &str) -> (Router
.await
.unwrap();
let http_server = HttpServer::new(
ServerSqlQueryHandlerAdaptor::arc(Arc::new(build_frontend_instance(instance))),
ServerSqlQueryHandlerAdaptor::arc(Arc::new(build_frontend_instance(instance.clone()))),
ServerGrpcQueryHandlerAdaptor::arc(instance.clone()),
HttpOptions::default(),
);
(http_server.make_app(), guard)
@@ -296,8 +297,10 @@ pub async fn setup_test_http_app_with_frontend(
)
.await
.unwrap();
let frontend_ref = Arc::new(frontend);
let mut http_server = HttpServer::new(
ServerSqlQueryHandlerAdaptor::arc(Arc::new(frontend)),
ServerSqlQueryHandlerAdaptor::arc(frontend_ref.clone()),
ServerGrpcQueryHandlerAdaptor::arc(frontend_ref),
HttpOptions::default(),
);
http_server.set_script_handler(instance.clone());