Skip to content

Commit 509e373

Browse files
authored
feat: change log read to spawn blocking (#574)
1 parent a660b15 commit 509e373

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

runtime/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Both the legacy and next examples can be run using the local client:
55

66
``` bash
77
cd path/to/example
8-
cargo run --manifest ../../../Cargo.toml --bin cargo-shuttle -- run
8+
cargo run --manifest-path ../../../Cargo.toml --bin cargo-shuttle -- run
99
```
1010

1111
When a more fine controlled testing is needed, use the instructions below.

runtime/src/axum/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,14 @@ impl Router {
268268
.data_mut()
269269
.insert_file(BODY_READ_FD, Box::new(body_read_client), FileCaps::all());
270270

271-
tokio::task::spawn(async move {
271+
tokio::task::spawn_blocking(move || {
272272
let mut iter = logs_stream.bytes().filter_map(Result::ok);
273273

274274
while let Some(log) = Log::from_bytes(&mut iter) {
275275
let mut log: runtime::LogItem = log.into();
276276
log.id = deployment_id.clone();
277277

278-
logs_tx.send(Ok(log)).await.unwrap();
278+
logs_tx.blocking_send(Ok(log)).unwrap();
279279
}
280280
});
281281

0 commit comments

Comments
 (0)