Question

I have implemented a Gearman server on the same machine as my webserver, in order to do some background video processing for a platform I'm working on (built on Laravel). So far, everything works well except for the grand finale, when the Gearman worker should notify the platform processing is complete.

I've created an API endpoint, as a route in Laravel without any form of authentification (for the moment). This endpoint is sent to the job as a parameter, which access it using cURL after processing the video. However, the curl_exec() call fails without setting CURLOPT_FOLLOWLOCATION. Still, setting CURLOPT_FOLLOWLOCATION will fail as well, because open_basedir restrictions are in place. It seems that cURL does not care that the calling script is located in a folder under a valid open_basedir location... it fails out of principle.

Could you suggest a way to rework this without removing open_basedir restrictions? Or maybe a different way of signaling processing is complete. I'm open to any ideas.

Was it helpful?

Solution

What you could use is this package

https://github.com/pafelin/laravel-gearman

follow the instructions from the README file and basically there will be no difference if you use the sync driver or the beanstalk driver or the gearman. This package adds full support for gearman to Laravel4.x

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top