Fastcgi #81

wants to merge 8 commits into


None yet

3 participants


As discussed in issue #76 this is a refactor of the the current fork/in-process strategy into independent objects along with the addition of a fastcgi strategy to utilize php-fpm.

A couple notes:

To pass the job between the worker and fastcgi I settled on serializing the job and passing as an environment variable. Specifically when failing a job both the worker and job instances are required. I thought it best to serialize and pass both rather than make changes to the failure code.

I pulled the FCGIClient into the repository, currently under the BitTP namespace as that is where i found it. I had to make a few changes to this class to make it fit our usage; Specifically it was originally written using non-blocking sockets and busy-waiting to read the socket. For our purposes a blocking fastcgi client is more appropriate so i made that change. It may be more appropriate to re-namespace or put into a repo on its own to be referenced by composer.

I could not come up with a good way to programmatically test this code. Its fairly straight forward code, and I've run numerous tests by hand, but needs automated on-going testing one way or the other. I'm open to suggestions which i can flush out into proper tests.


This looks good 👍.

Before I bring it in, I want to work on externalizing the FCGIClient (essentially creating a Composer package for it), and obviously work on the testing. If you don't have the time to do this, I'll probably begin work on getting this down sometime in the next two weeks.

Nice job!


The FastCGI client has been extracted into a suggested package, , and the pull request has been updated.

Still need to figure out a full featured way to test the JobStrategy interactions.


Awesome. 👍

Sorry, I meant to spend some time on this but dropped the ball because I've been busy with work and life at the moment. I definitely appreciate the effort you're putting into this.

@homeyjd homeyjd added a commit to dmvorg/php-resque that referenced this pull request Jan 5, 2015
@homeyjd homeyjd refactoring to JobStrategy, adding FastCGI option, fixing unit test i…

Merging changes from chrisboulton#81

what is the status on this PR ? is help needed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment