37,741
社区成员
发帖
与我相关
我的任务
分享 def queryCommands(self,servernos):
commands = None
Session = sessionmaker(bind=self.mssqlEngine)
session = Session()
try:
commands = session.query(Command).filter(Command.serverno.in_(servernos)).filter(Command.priority > 0).all().limit()
except Exception:
raise
finally:
session.close()
return commands