How to access a process object from different controllers

I am starting a simple process through the Symfony Process component.

/**
 * @Route("/start_process", name="startProcess")
 */
public function startProcessAction(Request $siteName) {

    $process = new Process('"C:\Program Files (x86)\GnuWin32\bin\wget.exe" --no-parent -U Mozilla -r http://google.de/');
    $process->start();

    return new Response("Process STARTED");
}

This part is working fine. However, since the process sometimes takes longer, I would like to check its progress and exit. The process starts asynchronously, so I thought I could do it in another controller, which I call through ajax.

I have no idea how to access the process object from another controller.

+4
source share
1 answer

, , , , , .. .

Process, symfony one process(), , process(). , (in_process, , - ..) ajax.

.

+1

All Articles