There is an application that sends to the back of a different type of task, these tasks are packed into a queue and every 15 minutes cron executes them. At the moment there is a simple notification that cron started processing the task queue, everything is working. There was a desire to listen to the execution status, of course, you can read the log, but I want real-time from the browser.
The way of thinking :
- We send a puzzle to back.
- We write it to the type log:
php run.php AmoParser mode=base_state > AmoParser_thread_$thread - On the client, every 5 seconds we send
AJAXand read the problem log
Here, as if everything is clear, we read the log - we are broadcasting to the browser, upon completion, to send a flag to the log that the broadcast is over (or how?). But how to be if at the same time 10 tasks are performed, I would like to look at the state of everyone as it is.
What if the log is very large or the task is slow? if I translate everything to the browser, it will somehow fall off over time, it’s necessary to control the issue and how to organize the streaming of the log file.
what do you advise?

PID. A piece of log in the sense of the last 200 lines? typecat <log_file> | tail -200cat <log_file> | tail -200- Redr01d