On Fri, Apr 9, 2010 at 9:17 PM, John Mettraux <[email protected]> wrote: > On Fri, Apr 9, 2010 at 8:53 PM, Olle <[email protected]> wrote: >> >> Let me ask another question. How (and is it possible) to identify >> "partially executed participant" using information from engine? We >> have some custom participant. Engine calls "consume", but during this >> call something goes wrong and engine get failed. How to separate such >> kind of "partially executed participant" from other ones? >> >>> No, if the operation/job/message has been taken/reserved by a worker, >>> it is considered done (by all the workers). >> >> May be engine "marks" expressions after returning from "consume" for >> futher filtering? >> >> I guess, other way is to create participant that set some workitem >> field before returning from consume and filter based on this field. > > Understood. > > I found this old thread of discussion : > > http://groups.google.com/group/openwferu-users/browse_thread/thread/c2aa4b53d1664d45/8523a1a5ee98fd71 > > I want to implement the technique discussed in it to cover this > aspect. Thanks for lobbying me again about it. > > Stay tuned.
Hello Oleg, I have implemented the first part of the idea : http://github.com/jmettraux/ruote/commit/0632032d36a61a1358d1d41e4ca3b2a7fd72aa9c It now flags a participant expressions with "dispatched = true" right after the dispatch is done. Thus the flag will not be set if the system crashes during the dispatch. Note that for a participant that threads, the dispatched flagging is done right after the thread is launched. Hence in, http://github.com/jmettraux/ruote/blob/0632032d36a61a1358d1d41e4ca3b2a7fd72aa9c/test/functional/eft_3_participant.rb#L122-148 to ease my tester life, I set the do_not_thread to false so that I can test the dispatched flag immediately. Next step is about automating the retry (or not). re_apply for all the participants that are not dispatched. I'm wondering if it should be a default operation for a [re]starting engine or if it should be an engine method like engine.re_apply_stalled_participants Not sure. What do you guys think ? -- 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 To unsubscribe, reply using "remove me" as the subject.
