示例#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