コード例 #1
0
ファイル: connection.py プロジェクト: goschtl/zope
 def _setDB(self, odb):
     Connection._setDB(self, odb)
     pool_ctl = odb.pool_scan_ctl
     if pool_ctl is not None:
         ctl = self._scan_ctl
         if ctl is None:
             self._scan_ctl = ctl = pool_ctl.new_connection()
         if ctl.elapsed():
             # Scan inside a transaction.
             transaction.get().register(self)
             # Let the scanner know which OIDs matter.
             ctl.set_oids(self._cache.cache_data.keys())
             # If it's time, scan on behalf of the whole pool.
             if pool_ctl.elapsed():
                 pool_ctl.scan()
             # If there were any invalidations, process them now.
             if self._invalidated:
                 self._flush_invalidations()
コード例 #2
0
 def _setDB(self, odb):
     Connection._setDB(self, odb)
     pool_ctl = odb.pool_scan_ctl
     if pool_ctl is not None:
         ctl = self._scan_ctl
         if ctl is None:
             self._scan_ctl = ctl = pool_ctl.new_connection()
         if ctl.elapsed():
             # Scan inside a transaction.
             transaction.get().register(self)
             # Let the scanner know which OIDs matter.
             ctl.set_oids(self._cache.cache_data.keys())
             # If it's time, scan on behalf of the whole pool.
             if pool_ctl.elapsed():
                 pool_ctl.scan()
             # If there were any invalidations, process them now.
             if self._invalidated:
                 self._flush_invalidations()