Skip to content

Commit fcb7e76

Browse files
committed
Instrument starting and shutting down supervisor
1 parent a02be31 commit fcb7e76

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/solid_queue/supervisor.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ def stop
3535
attr_reader :configuration
3636

3737
def boot
38-
run_callbacks(:boot) do
39-
@stopped = false
40-
sync_std_streams
38+
SolidQueue.instrument(:start_process, process: self) do
39+
run_callbacks(:boot) do
40+
@stopped = false
41+
sync_std_streams
42+
end
4143
end
4244
end
4345

@@ -57,8 +59,10 @@ def start_process(configured_process)
5759
end
5860

5961
def shutdown
60-
run_callbacks(:shutdown) do
61-
stop_maintenance_task
62+
SolidQueue.instrument(:shutdown_process, process: self) do
63+
run_callbacks(:shutdown) do
64+
stop_maintenance_task
65+
end
6266
end
6367
end
6468

0 commit comments

Comments
 (0)