def checkTaskThread(): while 1: time.sleep(5) result = packThreadManager.shareInstance().isRunning() if result == 0: break packThreadManager.shareInstance().startTask(0) taskManager.shareInstance().missionComplete() file_operate.printf('Mission Complete!') thread.exit_thread()
def checkTaskThread(arrayList=None, dictTemp=None): while 1: time.sleep(5) result = packThreadManager.shareInstance().isRunning() if result == 0: break packThreadManager.shareInstance().startTask(0, arrayList, dictTemp) taskManager.shareInstance().missionComplete() openfilefolder() file_operate.printf('Mission Complete!') print "\n---------------------------------all pack complete!---------------------------------" thread.exit_thread()
def start(arrayList, dictTemp): reload(sys) sys.setdefaultencoding('utf8') taskManager.shareInstance().clearRecord() packThreadManager.shareInstance().clearRecord() packThreadManager.shareInstance().setCurWorkDir(os.getcwd()) packThreadManager.shareInstance().startTask(0, arrayList, dictTemp) thread.start_new_thread(checkTaskThread, (arrayList, dictTemp))
def startIos(): reload(sys) sys.setdefaultencoding('utf8') ConfigParse.shareInstance().readUserConfig(1) taskManager.shareInstance().clearRecord() packThreadManager.shareInstance().clearRecord() packThreadManager.shareInstance().setCurWorkDir(os.getcwd()) source = ConfigParse.shareInstance().getSource() game = ConfigParse.shareInstance().getCurrentGame() versionName = ConfigParse.shareInstance().getVersionName() packThreadManager.shareInstance().startTask(1) thread.start_new_thread(checkTaskThreadForIos, ())
def start(): reload(sys) sys.setdefaultencoding('utf8') ConfigParse.shareInstance().readUserConfig(0) taskManager.shareInstance().clearRecord() packThreadManager.shareInstance().clearRecord() packThreadManager.shareInstance().setCurWorkDir(os.getcwd()) # source = ConfigParse.shareInstance().getSource() #print '<---source-->'+source # game = ConfigParse.shareInstance().getCurrentGame() # if os.path.isfile(source): # versionName = ConfigParse.shareInstance().getVersionName() # print '<---Config VersionName-->'+versionName # file_operate.backupApk(source, game, versionName) packThreadManager.shareInstance().startTask(0) thread.start_new_thread(checkTaskThread, ())
def stopAllTask(): """Stop all of the tasks""" taskManager.shareInstance().clearRecord() packThreadManager.shareInstance().stopAllTask()