def lzMonInHandHq(n,arrflag): if(inHandHqPEnable == 1): while True: print("Monitor inHasnd stocks ...") envGetConfig("lzStock.conf") inHandStock = envGetinHandStock() lzStockProcess.initializeMonitorStructure(inHandStock) while True: if(arrflag[2] == 0): lzStockProcess.realInterestStock(inHandStock) elif(arrflag[2] == 1 or arrflag[2] == 2): arrflag[2] = 0 break time.sleep(1)
def simulater(n,arrflag): while True: handStock = smGetStockFromDb() print("Monitor simulater stocks ...") if( len(handStock) == 0 ): print(" No simulater stocks, please buy ...") time.sleep(120) else: lzStockProcess.initializeMonitorStructure(handStock) while True: if(arrflag[3] == 0): debugPrint(" Start Monitor simulater stocks ...") lzStockProcess.simulaterInterestStock(handStock) time.sleep(1) elif(arrflag[3] == 1): arrflag[3] = 0 break elif(arrflag[3] == 2): print(" Create daily report ...") smStatisticData() arrflag[3] = 9 else: time.sleep(120)