this fix works for me, Maybe I'm doing it wrong in the first place, but if I run 1 worker with multiple jobs, the objects didn't get loaded properly, only the first job for each worker.. and there was no error, the job was reported as successful even though it didn't run at all.
Please let me know if there is something wrong with this patch.
require job files once
load objects if class/method exists
I can't replicate this problem. I tried with functions only and classes only and both functions and classes. All "do all" workers loaded all functions just fine. Here is my output from a running GearmanManager. All jobs answered fine. What are you seeing as output exactly?
it might be connected to the fact that I include a bootstrap.php (to get our loader going) in all jobs through require_once. The bootstrap.php also require_once on all the job class files.
It's my best guess after some soul searching. :)
I can't dive into this right now and confirm my guess, maybe next week.
But I still think the fix cf8067d does the loading a bit more robust then before, at least it works for me who have a non-standard autoloader :)
this is my output when I'm using a (bad) autoloader to be able to use libs from a framework we use at work.
I've created a new pull request : #35