andris9/gearnode — Issue #3: provide "safe" shutdown API ?
Author: perezd
Created: 2011-10-11 18:32:17+00:00
State: open

first of all, this project is really well done, thank you for contributing this to open source!

I'm using Gearnode in a situation where the worker nodes may need to be restarted in a frequent matter (ie: code deploys, maintenance, etc..) and I wanted to brainstorm additions to this library that would allow the developer to process jobs and hang up on the job server once completed, for safe termination.

I see that you've got closeConnection/close methods in the GearmanConnection object, but it might be interesting to add something to the GearmanJob API that allows you to say "here is my response, and hangup after you've received it, so I can no longer be considered a receiver of work, and die peacefully."

I could fork and try out some ideas, what is your take on the matter?