Gearman fun and frustration

runrig on 2010-03-24T18:24:03

I've been using Gearman a lot lately with Gearman::XS. In an effort to reduce boilerplate, I've released GearmanX::Starter to launch Gearman workers.

Other features of the module are signal handling, where if a worker gets a SIGTERM, it'll finish any current task before terminating. To get this to work, I had to use $job->send_complete("1"); (with quotes). I can not come up with a simple test case, but just in case someone else has the same issue, here's the possible work around.

Update: This is with Gearman::XS 0.7. It doesn't seem to occur with 0.8, so perhaps it's time to upgrade :-)