net_gearman
net_gearman copied to clipboard
Support for retrieving the status of a task asynchronously
I've created a patch to add support for calling get_status on the Gearman-server. To support this I've added a new property to Task which contains the server that is responsible for running the task, in addition to adding two new methods (and an array to keep track) to Client to be able to match server addresses to sockets easily. The new method is named getStatus(server, handle) and returns the ['data'] element (containing handle, numerator, denominator, finished, etc.).
The patchset is available here:
http://e-mats.org/resources/GearmanGetStatusSupport.tar.gz
It's against the current origin/master.
Will this patch be merged in with net_gearman? It looks like it'd be really useful.
Not sure what and if it ended up in Net_Gearman (53e108503f06d5ee4f0d72110e9d1bc9c26cf619), but a more lengthy discussion took place here:
https://github.com/matslindh/net_gearman/commit/53e108503f06d5ee4f0d72110e9d1bc9c26cf619
Ahh, interesting. It looks like it kind of petered out there. I'll likely end up wrapping Gearman up with a local library so that whatever ends up happening I can keep it behind the scenes. Thanks.