Skip to content

Commit

Permalink
add warn log and dbg_panic
Browse files Browse the repository at this point in the history
  • Loading branch information
yuandrew committed Nov 19, 2024
1 parent c1bd578 commit 998bbb2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/worker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,13 @@ impl Worker {
self.initiate_shutdown();
if let Some(name) = self.workflows.get_sticky_queue_name() {
// This is a best effort call and we can still shutdown the worker if it fails
let _ = self.client.shutdown_worker(name).await;
match self.client.shutdown_worker(name).await {
Err(err) if err.code() != tonic::Code::Unavailable => {
warn!("Failed to shutdown sticky queue {:?}", err);
dbg_panic!("Failed to shutdown sticky queue {:?}", err);
}
_ => {}
}
}
// We need to wait for all local activities to finish so no more workflow task heartbeats
// will be generated
Expand Down

0 comments on commit 998bbb2

Please sign in to comment.