fix: always remove child actors regardless of how they exit
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 4m7s
Test / build (map[name:stable]) (push) Successful in 4m30s
Release Please / Release-plz (push) Failing after 37s

This commit is contained in:
Paul Campbell 2024-12-22 21:13:22 +00:00
parent 0023e2aa70
commit 5abaf3038f
3 changed files with 15 additions and 18 deletions

View file

@ -129,17 +129,16 @@ impl Actor for ImportCardActor {
});
on_actor_link_died!(this, actor_ref, id, reason, {
let label = this.labels_children.remove(&id);
let attachment = this.attachments_children.remove(&id);
tracing::debug!(
?id,
?label,
?attachment,
"card (label|attachment) child stopped"
);
match reason {
ActorStopReason::Normal => {
let label = this.labels_children.remove(&id);
let attachment = this.attachments_children.remove(&id);
tracing::debug!(
?id,
?label,
?attachment,
"card (label|attachment) child stopped"
);
}
ActorStopReason::Normal => {}
_ => {
return Ok(Some(reason));
}

View file

@ -85,11 +85,10 @@ impl Actor for ImportStackActor {
});
on_actor_link_died!(this, actor_ref, id, reason, {
let stopped = this.children.remove(&id);
tracing::debug!(?id, ?stopped, "stack card child stopped");
match reason {
ActorStopReason::Normal => {
let stopped = this.children.remove(&id);
tracing::debug!(?id, ?stopped, "stack card child stopped");
}
ActorStopReason::Normal => {}
_ => {
return Ok(Some(reason));
}

View file

@ -139,11 +139,10 @@ impl Actor for ImportStacksActor {
});
on_actor_link_died!(this, actor_ref, id, reason, {
let stopped = this.children.remove(&id);
tracing::debug!(?id, ?stopped, "stacks stack child stopped");
match reason {
ActorStopReason::Normal => {
let stopped = this.children.remove(&id);
tracing::debug!(?id, ?stopped, "stacks stack child stopped");
}
ActorStopReason::Normal => {}
_ => {
return Ok(Some(reason));
}