예제 #1
0
 def cursor_open(self):
     """ Overridden to apply timeout """
     c, s = Database.cursor_open(self)
     if self.timeout > 0:
         s.execute("SET SESSION max_execution_time=%d" % self.timeout)
     return c, s
예제 #2
0
파일: postgresql.py 프로젝트: tgage/asm3
 def cursor_open(self):
     """ Overridden to apply timeout """
     c, s = Database.cursor_open(self)
     if self.timeout > 0:
         s.execute("SET statement_timeout=%d" % self.timeout)
     return c, s