chore: add startProcess for tmq common
This commit is contained in:
parent
cc62c400c6
commit
cf4da465e1
|
@ -605,6 +605,14 @@ class TMQCom:
|
|||
processID = ""
|
||||
print('**** warn: ', err)
|
||||
|
||||
def startProcess(self, processName, param):
|
||||
if platform.system().lower() == 'windows':
|
||||
cmd = f"mintty -h never %s %s > NUL 2>&1" % (processName, param)
|
||||
else:
|
||||
cmd = f"nohup %s %s > /dev/null 2>&1 &" % (processName, param)
|
||||
tdLog.info("%s"%(cmd))
|
||||
os.system(cmd)
|
||||
|
||||
def close(self):
|
||||
self.cursor.close()
|
||||
|
||||
|
|
|
@ -176,12 +176,7 @@ class TDTestCase:
|
|||
|
||||
# use taosBenchmark to subscribe
|
||||
binPath = self.getPath()
|
||||
if platform.system().lower() == 'windows':
|
||||
cmd = f"mintty -h never %s -f ./7-tmq/tmqDropConsumer.json > NUL 2>&1" % binPath
|
||||
else:
|
||||
cmd = f"nohup %s -f ./7-tmq/tmqDropConsumer.json > /dev/null 2>&1 & " % binPath
|
||||
tdLog.info("%s"%(cmd))
|
||||
os.system(cmd)
|
||||
tmqCom.startProcess(binPath, "-f ./7-tmq/tmqDropConsumer.json")
|
||||
|
||||
expectTopicNum = len(topicNameList)
|
||||
consumerThreadNum = 2
|
||||
|
|
|
@ -176,9 +176,7 @@ class TDTestCase:
|
|||
|
||||
# use taosBenchmark to subscribe
|
||||
binPath = self.getPath()
|
||||
cmd = "nohup %s -f ./7-tmq/tmqMaxGroupIds.json > /dev/null 2>&1 & " % binPath
|
||||
tdLog.info("%s"%(cmd))
|
||||
os.system(cmd)
|
||||
tmqCom.startProcess(binPath, "-f ./7-tmq/tmqMaxGroupIds.json")
|
||||
|
||||
expectTopicNum = 1
|
||||
expectConsumerNUm = 99
|
||||
|
|
Loading…
Reference in New Issue