One more piece of data... Changing to jobs=model.Job.select(orderBy=model.Job.q.submission_time ) (eliminating the where clause) fixes it if the job table had some entries at start up,
BUT if the table is empty on startup then it will still fail to pick up changes if populated later... Thinking the general problem may be that a select returning an empty set is not rechecked by SQLObject --Brandon -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brandon Goldfedder Sent: Friday, August 25, 2006 8:57 AM To: [email protected] Subject: [TurboGears] SQLObject help - caching? Hi, Having a weird problem in SQLObject usage between 2 programs that I just can't seem to crack. I have a turbogears program that is exporting its work to a Job table. I have a second program running sharing the model (turbogears.update_config(configfile="dev.cfg", modulename="myproject.config")) that simply reads the job queue: jobs=model.Job.select( model.Job.q.status == 'pending', orderBy=model.Job.q.submission_time ) for j in jobs: I defined the job to not cache thinking that might be an issue: class Job(SQLObject): "Represents a submitted datageneration, technology execution or scoring task" class sqlmeta: cacheValues = False submission_time = DateTimeCol(default=datetime.now) task = StringCol(length=15, notNone = True) progress = StringCol(length=50, default = None) parameters = StringCol(length=255, notNone = True, default='{}') status = EnumCol(enumValues=['pending', 'running', 'success', 'failure'], default='pending') executionStartTime = DateTimeCol(default=None) executionStopTime = DateTimeCol(default=None) results = StringCol(length=100, default=None) The problem: If the second program is started first, it does not appear to pick up changes to the job table (is it caching it) If I change my job query to not use the constraint on pending it works a little better but is still not always picking up the changes that may occur after it starts: jobs=model.Job.select(orderBy=model.Job.q.submission_time ) So, what am I missing about sharing the use of a db in this manner between programs (is SQLObject getting in way)? Thanks, Brandon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

