Hi John, I have just reviewed the code and tested against the contrived example in this thread. launch_single does exactly what I had in mind, thank you very much for this addition, and thumbs-up for completing overnight!
The reserved wfid cases in your first post (http://gist.github.com/ 597086) surprised me a bit (are there really reserved ids in Ruote?), and it seems there is also a risk for infinite looping with the second return statement. The code is gone anyway, and the latest version worked fine in a couple of tests. About your second test case, is there any concrete reason to sleep for 0.4s ? Eric On Sep 26, 12:56 pm, John Mettraux <[email protected]> wrote: > On Sun, Sep 26, 2010 at 02:39:31AM +0900, John Mettraux wrote: > > > On Fri, Sep 24, 2010 at 09:15:30AM -0700, Eric Platon wrote: > > > > It is clear that calling #launch initializes a new process and thus > > > produces the expected behavior (meaning no bug), but I was actually > > > wondering whether #launch should not be "resume-aware" through the > > > storage. Not sure what is worth right now. Your extended quickstart is > > > sound and clear to me, but I feel that it could be more compact: The > > > storage could be used as a memory across runs, instead of adding a > > > wfid file. I mean, it looks less elegant than just relying on the > > > storage, notably when using FsStorage. > > > > That's maybe just me, and it would be a significant rewrite. Still > > > learning! Going forward. Thanks again for your prompt support! > > > I hope to finish it by tomorrow. > > > It's true that the wfid file trick is not adapted to environments where > > engines in different Ruby runtimes launch such "unique" processes, hence my > > launch_single() work. > > Hello Eric, > > thanks for your idea, I've refined the launch_single method into : > > http://github.com/jmettraux/ruote/commit/b1d1046b60b4a11ef3b0cb4cc83b... > > The tests look like : > > http://github.com/jmettraux/ruote/blob/ruote2.1/test/functional/ft_46... > > Not super happy with the 'single[s]' appellation, but I didn't want to use > 'singleton'... Well I could have, I already have 'instances'... > > Thanks again, > > -- > 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
