Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added custom reconnect service #514

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Fix doc and readbility
  • Loading branch information
Kayanski committed Oct 30, 2024
commit b44398e3c4573c6c76ea6b032ce800ea9063c5b3
3 changes: 2 additions & 1 deletion cw-orch-daemon/src/service/retry/implementation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ impl<E> Policy<Req, Res, E> for Attempts {
let (parts, original_body) = req.into_parts();

// Try to capture the Bytes from the original body
// This is circumvoluted, I'm not sure how to call an async function within a sync function that is used inside a future later
let bytes = futures::executor::block_on(async move {
RUNTIME
tokio::runtime::Handle::current()
.spawn(async move { consume_unsync_body(original_body).await })
.await
.unwrap()
Expand Down