Skip to content

Commit

Permalink
use executor.spawn from within the worker to start the storage heartb…
Browse files Browse the repository at this point in the history
…eat tasks as shutdown signals are not propagating through Graceful futures within a Graceful future (#195)

Co-authored-by: kdesjard <[email protected]>
  • Loading branch information
kdesjard and Kris-Desjardins authored Nov 9, 2023
1 parent 7a4afee commit 04cc8cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/apalis-core/src/worker/ready.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ where
let (send, mut recv) = futures::channel::mpsc::channel::<()>(1);
// Setup any heartbeats by the worker
for mut beat in self.beats {
ctx.spawn(async move {
ctx.executor.spawn(async move {
#[cfg(feature = "async-std-comp")]
#[allow(unused_variables)]
let sleeper = crate::utils::timer::AsyncStdTimer;
Expand Down

0 comments on commit 04cc8cc

Please sign in to comment.