On Wed, May 05, 2010 at 10:50:30AM +0200, Kenneth Kalmer wrote: > > > I'd say the local part (as opposed to the remote part) of your participant > > should receive the workitem back and raise an error. > > > > I've been trying to gather an example at : > > > > http://github.com/jmettraux/ruote-beanstalk/blob/ruote2.1/lib/ruote/beanstalk/participant.rb > > > > http://github.com/jmettraux/ruote-beanstalk/blob/ruote2.1/lib/ruote/beanstalk/receiver.rb > > > > but I still have to implement/provide the #raise_error method so that such > > remote errors can be replayed (via a re-dispatch). Still some work for me in > > ruote itself.
Hello Kenneth, still untested but leverages a refactored error_handler in ruote 2.1.10 : http://github.com/jmettraux/ruote-beanstalk/blob/ruote2.1/lib/ruote/beanstalk/receiver.rb This receiver expects two kind of messages (encoded as JSON) : [ 'workitem', { ... workitem as hash ... } ] and [ 'error', { ... fei as hash ... } ] Maybe later I/we could extend the last message as [ 'error', { ... fei as hash ... }, 'cause / error message' ] Of course, this is purely conventional (inside of ruote-beanstalk), but it shows how trigger an error from a receiver. I will add some tests to http://github.com/jmettraux/ruote/blob/ruote2.1/test/functional/ft_25_receiver.rb very soon. Best regards, -- John Mettraux - http://jmettraux.wordpress.com -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
