Ticket #58 (closed enhancement: invalid)

Opened 1 year ago

Last modified 1 year ago

Better handling of dead workers

Reported by: che..@aura-online.co.uk Assigned to: ska..@waste.org
Priority: major Milestone:
Component: workers Version:
Keywords: Cc: masterkain@gmail.com, chris@kampers.net

Description

Even though results are kept in the results worker after a regular worker dies, you currently cannot access those results directly if you did not obtain a WorkerProxy? instance while the worker was still alive. Instead you have to query the results worker itself for the results, which is inconsistent. This happens because when you call MiddleMan?.worker(:some_job_key), nil is returned since the key was removed from @jobs when the worker died.

I have written a patch which changes this behaviour. Instead of returning nil, an instance of DeadWorkerProxy? is returned. Calling results on this object will immediately query the results worker without trying to contact the regular worker first - since we already know that it has died. To prevent code repetition, WorkerProxy? creates a temporary instance of DeadWorkerProxy? when the worker has gone away and the method being called is one handled by DeadWorkerProxy? (currently delete and results). I felt that a temporary instance would be best since it is always possible that a worker may have only gone away temporarily due to a network failure, for example.

Attachments

dead_worker_proxy.patch (2.0 kB) - added by che..@aura-online.co.uk on 06/05/07 08:47:47.

Change History

06/05/07 08:47:47 changed by che..@aura-online.co.uk

  • attachment dead_worker_proxy.patch added.

06/05/07 09:54:32 changed by masterka..@gmail.com

  • cc set to masterka..@gmail.com.

08/15/07 14:09:48 changed by chr..@kampers.net

  • cc changed from masterka..@gmail.com to masterka..@gmail.com, chr..@kampers.net.

12/16/07 04:32:08 changed by gethema..@gmail.com

  • status changed from new to closed.
  • resolution set to invalid.

Fixed with new version.