On Fri, 2007-04-05 at 08:54 -0500, Kevin Horn wrote: > Hmmm...if this is a long-running process it could cause some serious > concurrency and/or blocking probs with the multiple threads in TG. > Could this be your issue?
I think it must have been something like that. Once I switched it to a module that gets called in the normal way the behaviour was fixed up. Thanks for the tip! Iain > > You might try using the TG scheduler to run this process. I haven't > really used the scheduler yet, but it seems to me there should be a > way to "schedule" a process to run almost immediately, and using the > scheduler should get you outside the normal request cycle (thus > avoiding many potential threading-related hazards). > > Anyone with more experience with the scheduler wanna double-check me > on this? > > Kevin Horn > > On 5/4/07, iain duncan <[EMAIL PROTECTED]> wrote: > > Hi folks, I guess the way I'm trying to do this won't work, > but I'm > wondering why that is. I have a python script that tears a tg > site down > into static files using urllib and then installs them using > ftplib. The > script works fine as a standalone. > > I thought it would be easy to attach it to my admin interface > by having > an admin controller method that called the script via > > os.system( "scraper.py" ) > > It seems to work sometimes, and sketch out half way through > it's job on > others even thought the admin method returns and prints its > "all done" > message. Wondering if anyone can shed light on why this might > not work > or is a bad idea, etc. > > Also, before I waste a lot of time learning more things the > hard way, if > anyone can tell me whether using ftplib from within a tg app > is at all > feasible that would be great too! ;) > > Thanks > Iain > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

