Skip to content

Commit 9da8e15

Browse files
committed
Guard against heartbeat task not having started when we're shutdown
It can happen if there's a fundamental error that makes us fail as soon as we try to start ^_^U (for example, the DB we're trying to connect not existing).
1 parent 5c0da50 commit 9da8e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/solid_queue/process_registration.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def launch_heartbeat
5454
end
5555

5656
def stop_heartbeat
57-
@heartbeat_task.shutdown
57+
@heartbeat_task&.shutdown
5858
end
5959

6060
def heartbeat

0 commit comments

Comments
 (0)