net_gearman icon indicating copy to clipboard operation
net_gearman copied to clipboard

Support for retrieving the status of a task asynchronously

Open matslindh opened this issue 16 years ago • 3 comments

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.

matslindh avatar Jul 03 '09 23:07 matslindh

Will this patch be merged in with net_gearman? It looks like it'd be really useful.

dpkirchner avatar Jul 19 '11 23:07 dpkirchner

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

matslindh avatar Jul 20 '11 13:07 matslindh

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.

dpkirchner avatar Jul 20 '11 16:07 dpkirchner