Skip to content
Closed
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
28 changes: 14 additions & 14 deletions engine/packages/pegboard/src/workflows/actor/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,20 +640,20 @@ pub async fn reschedule_actor(
};
state.reschedule_state.last_retry_ts = now;

// Don't sleep for first retry
if state.reschedule_state.retry_count > 0 {
let next = backoff.step().expect("should not have max retry");

// Sleep for backoff or destroy early
if let Some(_sig) = ctx
.listen_with_timeout::<Destroy>(Instant::from(next) - Instant::now())
.await?
{
tracing::debug!("destroying before actor start");

return Ok(SpawnActorOutput::Destroy);
}
}
// // Don't sleep for first retry
// if state.reschedule_state.retry_count > 0 {
// let next = backoff.step().expect("should not have max retry");

// // Sleep for backoff or destroy early
// if let Some(_sig) = ctx
// .listen_with_timeout::<Destroy>(Instant::from(next) - Instant::now())
// .await?
// {
// tracing::debug!("destroying before actor start");

// return Ok(SpawnActorOutput::Destroy);
// }
// }

let next_generation = state.generation + 1;
let spawn_res = spawn_actor(
Expand Down
Loading