improve taosdStatus
This commit is contained in:
parent
02c96a2fa3
commit
037816547b
|
@ -188,17 +188,21 @@ class TDSql:
|
||||||
tdLog.info("sql:%s, affectedRows:%d == expect:%d" % (self.sql, self.affectedRows, expectAffectedRows))
|
tdLog.info("sql:%s, affectedRows:%d == expect:%d" % (self.sql, self.affectedRows, expectAffectedRows))
|
||||||
|
|
||||||
def taosdStatus(self, state):
|
def taosdStatus(self, state):
|
||||||
|
tdLog.sleep(5)
|
||||||
pstate = 0
|
pstate = 0
|
||||||
loop = 0
|
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
|
pstate = 0
|
||||||
pl = psutil.pids()
|
pl = psutil.pids()
|
||||||
for pid in pl:
|
for pid in pl:
|
||||||
if psutil.Process(pid).name == 'taosd':
|
if psutil.Process(pid).name == 'taosd':
|
||||||
pstate = 1
|
pstate = 1
|
||||||
loop = 1
|
|
||||||
break
|
break
|
||||||
if loop:break
|
if pstate:
|
||||||
time.sleep(5)
|
tdLog.sleep(5)
|
||||||
|
continue
|
||||||
|
pstate = 0
|
||||||
|
break
|
||||||
|
|
||||||
args=(pstate,state)
|
args=(pstate,state)
|
||||||
if pstate == state:
|
if pstate == state:
|
||||||
tdLog.info("taosd state is %d == expect:%d" %args)
|
tdLog.info("taosd state is %d == expect:%d" %args)
|
||||||
|
|
Loading…
Reference in New Issue