Kevin Dangoor wrote:
> I thought I fixed this, and I "sort of" did. Once you hit the  
> database, this shouldn't happen. I just added an explicit call in  
> startup.startTurboGears that will hopefully take care of this.

FYI,

It looks like this is partially a SQLAlchemy issue. I have a working 
setup which combines a SQLAlchemy patch [still pending review; it's had 
issues in the past, so I'm hesitant to post it here] resolving the 
issues on their side with the following changes to TurboGears:

Index: turbogears/database.py
===================================================================
--- turbogears/database.py      (revision 1606)
+++ turbogears/database.py      (working copy)
@@ -32,6 +32,8 @@
                  raise KeyError("No sqlalchemy database config found!")
              _engine = sqlalchemy.create_engine(dburi)
              metadata.connect(_engine)
+        elif not metadata.is_bound():
+            metadata.connect(_engine)
          return _engine

      def create_session():
Index: turbogears/visit/savisit.py
===================================================================
--- turbogears/visit/savisit.py (revision 1606)
+++ turbogears/visit/savisit.py (working copy)
@@ -45,6 +45,9 @@
      def update_queued_visits(self, queue):
          # TODO this should be made transactional
          table = visit_class.table
+
+        turbogears.database.bind_meta_data()
+
          # Now update each of the visits with the most recent expiry
          for visit_key,expiry in queue.items():
              log.info("updating visit (%s) to expire at %s", visit_key,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to