I am building a Gearman job which executes a command with real-time output stream (STDOUT). I am using PHP.
My Rest API needs to return a temporary URL where client can connect to see the output.
REST API call.
creates Gearman background job
return 'http://example.com/status?job=123'
HTTP call to status?123
disables cache
output output from job produced so far
reads and flushes any further output
The only way I've found so far is by using jobStatus()
but it only gives progression information. I also do not want to introduce expensive database pulling techniques.
Can this be done in Gearman or some other server in a simple way? If there is another queue implementation which can be used instead with PHP?