attic: always prefer streams
This commit is contained in:
parent
959deb8dbc
commit
8ffe43a441
1 changed files with 11 additions and 1 deletions
|
@ -1,7 +1,16 @@
|
|||
diff --git a/server/src/api/binary_cache.rs b/server/src/api/binary_cache.rs
|
||||
index 02e4857..71eeee8 100644
|
||||
index 02e4857..b522154 100644
|
||||
--- a/server/src/api/binary_cache.rs
|
||||
+++ b/server/src/api/binary_cache.rs
|
||||
@@ -215,7 +215,7 @@ async fn get_nar(
|
||||
let chunk = chunks[0].as_ref().unwrap();
|
||||
let remote_file = &chunk.remote_file.0;
|
||||
let storage = state.storage().await?;
|
||||
- match storage.download_file_db(remote_file, false).await? {
|
||||
+ match storage.download_file_db(remote_file, true).await? {
|
||||
Download::Url(url) => Ok(Redirect::temporary(&url).into_response()),
|
||||
Download::AsyncRead(stream) => {
|
||||
let stream = ReaderStream::new(stream).map_err(|e| {
|
||||
@@ -262,7 +262,7 @@ async fn get_nar(
|
||||
|
||||
// TODO: Make num_prefetch configurable
|
||||
|
@ -11,3 +20,4 @@ index 02e4857..71eeee8 100644
|
|||
tracing::error!(%e, "Stream error");
|
||||
e
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue