For different reasons I need to read the PID of the queues of a supervisor in Laravel Horizon. The problem is that I can't find the information in the library.
I'm able to retrieve all supervisor like this:
public function index(SupervisorRepository $supervisors){
$supervisors = collect($supervisors->all())->sortBy('name');
return $supervisors;
}
or all workload (queue) like this:
public function index(WorkloadRepository $workloadRepository){
$workload = collect($workloadRepository->get())->sortBy('name')->values()->toArray();
return $workload;
}
but I don't see how I can get the PID of queue by the repository, last but not least I can't run shell command on my server so I must get it by either accessing Redis or Laravel Horizon.
Turn out you can't get it from horizon, you need to get it by questioning your os