Saturday, 15 August 2015

Gearman callback with nested jobs -



Gearman callback with nested jobs -

i have gearman job runs , executes more jobs when in turn may execute more jobs. kind of callback when nested jobs have completed. can this, implementations tie workers (spin until children complete) not want do.

is there workaround? there no concept of "groups" in gearman afaik, can't add together jobs grouping , have fire 1 time grouping has completed.

as say, there's nil built-in gearman handle this. if don't want tie worker (and letting worker add together tasks , track completion you), you'll have out-of-band status tracking.

a way maintain grouping identifier in memcached, , increment number of finished subtasks when task finishes, , increment number of total tasks when add together new 1 same group. can poll memcached see current state of execution (tasks finished vs tasks total).

gearman

No comments:

Post a Comment