Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions reqactor/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,17 @@ impl Actor {
return Ok(pool_status_opt.unwrap());
}

// Mark the request as registered in the pool
let status = StatusWithContext::new(Status::Registered, start_time);
// Mark the request as registered in the pool, or update to work in progress if already registered
let status = if let Some(ref pool_status) = pool_status_opt {
match pool_status.status() {
Status::Registered => StatusWithContext::new(Status::WorkInProgress, start_time),
Status::WorkInProgress => pool_status.clone(),
_ => StatusWithContext::new(Status::Registered, start_time),
}
} else {
StatusWithContext::new(Status::Registered, start_time)
};

if pool_status_opt.is_none() {
self.pool_add_new(request_key.clone(), request_entity.clone(), status.clone())
.await?;
Expand Down