midtoad schrieb: > I'm looking for some advice on how to proceed with a TurboGear > application I'm building. Specifically, I want to query a pop mailbox > periodically, fetch messages and parse them, then (eventually?) put > them in an Sqlite database where the TurboGears app can fetch them and > display them in the web app. > What is the best way to design this?
Use the scheduler to run a function periodically, that checks the mailbox and stores the messages i the db: http://docs.turbogears.org/1.0/Scheduler I have some (demo) code that does exactly this for IMAP mailboxes. I can send it to you privately, if you like. > Are there likely to be database contention issues if a background > process is trying to write to the database while the web app is also > trying to read data from the database? If you use an SQLite database: yes. It would be better use a "real" db system for that, that has finer grained locking than SQLite, that just locks the whole database if a thread is writing to it, and then use transactions where appropriate. Chris --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

