Skip to content

Commit a9d7da6

Browse files
committed
Ensure that non-standalone supervisor terminates gracefully
Standalone supervisors run this from the signal handler, so for non-standalone we need to make sure this is run after shutting down.
1 parent cca44d2 commit a9d7da6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/solid_queue/async_supervisor.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
module SolidQueue
44
class AsyncSupervisor < Supervisor
5+
after_shutdown :terminate_gracefully, unless: :standalone?
6+
57
def stop
68
super
79
@thread&.join

0 commit comments

Comments
 (0)