Spread::Queue::ManagedWorker - utility class for Spread::Queue::Manager


Spread-Queue documentation  | view source Contained in the Spread-Queue distribution.

Index


NAME

Top

  Spread::Queue::ManagedWorker - utility class for Spread::Queue::Manager

DESCRIPTION

Top

Tracks each worker that is registered with the queue manager. Retains worker state.

Eventually add activity metrics (# messages assigned, uptime, utilization, etc.).

States are:

ready - available for task assignment

Worker controls this by sending a 'ready' message to the queue manager.

assigned - allocated to a task

Set by manager, after a message is transmitted to a ready worker.

acknowledged - worker is working on a task

When a 'working' message is received from an assigned worker.

terminated - no longer available for task assignment

'terminated' message has been received from worker, or an expected status update has not been received so queue manager marks the worker as dead.

If an assigned worker is terminated, then the task that was assigned to that worker will be re-assigned to another worker.

METHODS

Top

AUTHOR

Top

Jason W. May <jmay@pobox.com>

COPYRIGHT

Top

SEE ALSO

Top

  L<Spread::Queue>


Spread-Queue documentation  | view source Contained in the Spread-Queue distribution.