All of my data lives in the same database so it uses the same engine.
However, the data is split into related groups, each using a different
DynamicMetaData instance.
Interesting about TG cleaning up after a request. So TG automatically
calls objectstore.flush() after every request? If so, that's great.
I'm also calling metadata.connect() in model.py and importing it into
my root controller module, but that doesn't seem to take care of
connections for my threads. That's why I have to do this bit in my
main controller..
def connectKlass(thread_index):
for klass in (Tinwsys, User, Project):
class_mapper(klass).mapped_table.metadata.connect(engine)
cherrypy.server.on_start_thread_list.append(connectKlass)
This connects the PackageEngine instance to my three DynamicMetaData
instances when a therad spawns. You didn't mention having do use
on_start_thread_list, so I'm wondering if I'm missing something.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---