Skip to content

Commit

Permalink
clean up the panic msg and variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-jiang committed Jan 9, 2025
1 parent 4e290f9 commit 2fe231a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/topology/running.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,10 @@ impl RunningTopology {
// Now kick off the shutdown process by shutting down the sources.
let source_shutdown_complete = self.shutdown_coordinator.shutdown_all(deadline).map(|_| Result::<(), ()>::Ok(()));

// Panic to ensure that Vector returns a non-zero exit code when it's unable to gracefully shutdown
futures::future::join(source_shutdown_complete, shutdown_complete_future)
.map(|xy| match xy.1.0 {
Result::Err(_) => panic!("alexj's panic: failed to gracefully shutdown in time"),
.map(|futures| match futures.1.0 {
Result::Err(_) => panic!("failed to gracefully shutdown in time, panic to force non-zero exit code"),
Result::Ok(_) => (),
})
}
Expand Down

0 comments on commit 2fe231a

Please sign in to comment.