On Tue, Jan 27, 2009 at 05:11:19PM -0500, Jesus Rodriguez wrote: > On Tue, Jan 27, 2009 at 04:12:43PM -0500, Jason Dobies wrote: > [snip] > > > Outside of what we track for a request, the big question is how to > > thread off the work. > > > > One possibility is taskomatic, which I'm not entirely familiar with. I > > do see from the wiki that we have tasks scheduled for once a minute, > > which I think is an acceptable delay before one of these SSM actions > > begins to process. > > taskomatic can run tasks that poll in any configuration. i.e. once a > minute, daily, etc. > > > I think we have to be able to allow more than one of these SSM actions > > to take place concurrently, however there is a definite upper limit to > > how many we should allow at once. We'll also need a mechanism to time > > out these actions and potentially a way for a user-initiated cancel. I'm > > not sure if it's possible to exercise this sort of set up through > > taskomatic/quartz. Anyone familiar care to comment? > > You can start a job using the MessageQueue. :) It was originally > written to send out emails, but we also used it to calcuate the errata cache > during login. It's as simple creating an appropriate Event class and > an Action (NOT a Struts Action) class.
Look at ./code/src/com/redhat/rhn/frontend/events/ for Event classes. So you can look at UpdateErrataCacheAction and UpdateErrataCacheEvent. Define your own pairs and you can easily spawn your own things in the background. > > Otherwise, outside of EJBs, I'm not sure of any other options (besides > > just spinning off my own threads, but I doubt we want to go that > > route). > > The above mechanism is effectively a new thread :) We'd have to upgrade to a full blown appserver for EJBs wouldn't we? So for now I'd say no to that. -- jesus m. rodriguez | [email protected] sr. software engineer | irc: zeus rhn satellite & spacewalk | 919.754.4413 (w) rhce # 805008586930012 | 919.623.0080 (c) +-------------------------------------------+ | "Those who cannot learn from history | | are doomed to repeat it." | | -- George Santayana | +-------------------------------------------+ _______________________________________________ Spacewalk-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-devel
