Answer the question
In order to leave comments, you need to log in
How to make output to data page from another thread in yii2?
There is a task (a new "thread" via proc_open) that is started by an action via an ajax request. This same stream periodically outputs information to stdout. You need to redirect the output to the page. How to do it better?
I imagine it like this: when the action is executed, the status of the task is checked (working, ready for work). If ready to work, then execution starts. Otherwise, a withdrawal request is made. The question is, how do you get to that conclusion? It is desirable to have a solution without any intermediate buffers in the form of a database or files, but inside the stream itself, as I understand it, it is better to make a variable, where will the "under-received output" be?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question