本文整理汇总了Python中OrangeGbl.sql_UpdDriveRun方法的典型用法代码示例。如果您正苦于以下问题:Python OrangeGbl.sql_UpdDriveRun方法的具体用法?Python OrangeGbl.sql_UpdDriveRun怎么用?Python OrangeGbl.sql_UpdDriveRun使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OrangeGbl
的用法示例。
在下文中一共展示了OrangeGbl.sql_UpdDriveRun方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Main
# 需要导入模块: import OrangeGbl [as 别名]
# 或者: from OrangeGbl import sql_UpdDriveRun [as 别名]
def Main():
try:
rc = gL.ParseArgs()
#---------------------------------------------- M A I N ------------------------------------------------
# apri connessione e cursori, carica keywords in memoria
#gL.SqLite, gL.C = gL.OpenConnectionSqlite()
#gL.MySql, gL.Cursor = gL.OpenConnectionMySql(gL.Dsn)
rc = OpenDb()
if not rc:
print("Errore in openDb")
return False
gL.restart == False
runid = gL.Restart()
rc = gL.SetLogger("GOO", gL.RunId, gL.restart)
gL.log(gL.INFO, gL.Args)
if gL.restart == True:
gL.RunId = runid
rc = gL.RunInit()
if not rc:
gL.log(gL.ERROR, "RunInit errato")
return False
rc = RestartParse() # -----------------RESTART----------------------------------
if not rc:
return False
else:
#chiudo le tabelle dei run
rc = gL.RunIdStatus("END")
rc = gL.sql_UpdDriveRun("END")
# run normale
if gL.restart == False:
# controllo la tabella Drive e la leggo
gL.cMySql.execute("SELECT * FROM QDrive ORDER BY rnd(starturlid)")
gL.Drive = gL.cMySql.fetchall()
if len(gL.Drive) == 0:
print("Nessun run da eseguire")
else:
gL.RunId = gL.RunIdCreate()
rc = gL.RunIdStatus("START")
if not rc:
gL.log(gL.ERROR, "RunId errato")
rc = gL.SetLogger("GOO", gL.RunId, gL.restart)
if not rc:
gL.log(gL.ERROR, "SetLogger errato")
gL.log(gL.WARNING, "Proxy:"+str(gL.Useproxy))
rc = gL.RunInit()
if not rc:
gL.log(gL.ERROR, "RunInit errato")
rc = NormalParse() # -------------------RUN------------------------------------
if not rc:
gL.log(gL.ERROR, "Run terminato in modo errato")
else:
#chiudo le tabelle dei run
rc = gL.RunIdStatus("END")
# chiudi DB
gL.CloseConnectionMySql()
gL.CloseConnectionSqlite()
return True
except Exception as err:
gL.log(gL.ERROR, err)
return False