feat(backend) fix moving backend when pulling

This commit is contained in:
Morgan Funtowicz 2024-12-04 17:32:14 +01:00
parent 460f290d5b
commit 300f6c6f94

View File

@ -121,8 +121,7 @@ fn executor_status_looper(
} }
if backend.num_tokens_ready() > 0 { if backend.num_tokens_ready() > 0 {
let backend = backend.pin_mut(); match backend.pin_mut().pull_tokens() {
match backend.pull_tokens() {
Ok(responses) => { Ok(responses) => {
// Iterate through all the decoded token // Iterate through all the decoded token
for step in responses.deref() { for step in responses.deref() {
@ -141,7 +140,7 @@ fn executor_status_looper(
if posted.is_err() || step.is_final { if posted.is_err() || step.is_final {
debug!("Removing {}", step.request_id); debug!("Removing {}", step.request_id);
backend.cancel(step.request_id); backend.pin_mut().cancel(step.request_id);
let _ = in_flights.remove(&step.request_id); let _ = in_flights.remove(&step.request_id);
} }
} else { } else {