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

fix(host): ignore no id found error for cancellation #330

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 13 additions & 2 deletions host/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,23 @@ impl ProofActor {
};

let mut manager = get_task_manager(&self.opts.clone().into());
key.proof_system
match key
.proof_system
.cancel_proof(
(key.chain_id, key.blockhash, key.proof_system as u8),
Box::new(&mut manager),
)
.await?;
.await
{
petarvujovic98 marked this conversation as resolved.
Show resolved Hide resolved
Ok(_) => (),
Err(e) => {
if e.to_string().contains("no id found") {
warn!("Task already cancelled");
} else {
return Err(e.into());
}
}
};
task.cancel();
Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions host/src/server/api/v2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ mod proof;
TaskStatus,
CancelStatus,
PruneStatus,
Proof,
Status,
)
),
Expand Down
Loading