From 6d7bc6f5320b4cdd239ee34c4e68b1fba0644cf2 Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Tue, 10 Sep 2024 19:31:13 +0200 Subject: [PATCH] Fix block for `with_lock`, that doesn't yield the receiver Thanks to @npezza93 for catching this ^_^U --- lib/solid_queue/processes/registrable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/solid_queue/processes/registrable.rb b/lib/solid_queue/processes/registrable.rb index 084e8faf..24941238 100644 --- a/lib/solid_queue/processes/registrable.rb +++ b/lib/solid_queue/processes/registrable.rb @@ -53,7 +53,7 @@ def stop_heartbeat end def heartbeat - process.with_lock(&:heartbeat) + process.with_lock { process.heartbeat } rescue ActiveRecord::RecordNotFound self.process = nil wake_up