| Class | DaemonKit::RuoteWorkitem |
| In: |
lib/daemon_kit/ruote_workitem.rb
|
| Parent: | Object |
Dual purpose class that is a) responsible for parsing incoming workitems and delegating to the correct RuotePseudoParticipant, and b) wrapping the workitem hash into something a bit more digestable.
Extract the class and method name from the workitem, then pick the matching class from the registered list of participants
Expects a JSON workitem from ruote that has these fields set in attributes key:
{
'reply_queue' => 'queue to send replies to',
'params' => {
'command' => '/actor/method'
}
}
It looks like a resource, and will be treated as such. Is should be in the format of +/class/method+, and it will be passed the complete workitem as a hash.
Replies are sent back to the queue specified in the reply_queue key.
Where daemon-kit detects errors in attempting to parse and delegate the workitems, it will reply to the engine and set the following field with the error information:
daemon_kit.error