refactor(tvix/glue): drop register_node_in_path_info_service_sync
Replace the (single) callsite with some code interacting with the tokio runtime to block on the async version. Change-Id: I3976496ae77b2bb8734603f303655834265e3f0a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11284 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
f1e6f98072
commit
bd32024047
2 changed files with 6 additions and 13 deletions
|
@ -133,7 +133,12 @@ mod import_builtins {
|
|||
let name = tvix_store::import::path_to_name(&p)?;
|
||||
|
||||
Ok(state
|
||||
.register_node_in_path_info_service_sync(name, &p, root_node)
|
||||
.tokio_handle
|
||||
.block_on(async {
|
||||
state
|
||||
.register_node_in_path_info_service(name, &p, root_node)
|
||||
.await
|
||||
})
|
||||
.map_err(|err| ErrorKind::IO {
|
||||
path: Some(p.to_path_buf()),
|
||||
error: err.into(),
|
||||
|
|
|
@ -334,18 +334,6 @@ impl TvixStoreIO {
|
|||
Ok(output_path)
|
||||
}
|
||||
|
||||
pub(crate) fn register_node_in_path_info_service_sync(
|
||||
&self,
|
||||
name: &str,
|
||||
path: &Path,
|
||||
root_node: Node,
|
||||
) -> io::Result<StorePath> {
|
||||
self.tokio_handle.block_on(async {
|
||||
self.register_node_in_path_info_service(name, path, root_node)
|
||||
.await
|
||||
})
|
||||
}
|
||||
|
||||
pub async fn store_path_exists<'a>(&'a self, store_path: StorePathRef<'a>) -> io::Result<bool> {
|
||||
Ok(self
|
||||
.path_info_service
|
||||
|
|
Loading…
Reference in a new issue