Merge pull request #7437 from taosdata/fix/ZhiqiangWang/TD-6169-windows-dll-client-can-not-quit-problem
[DONT MERGE] [TD-6169]<fix>: windows dll client can not quit.
This commit is contained in:
commit
77a920d278
|
@ -537,7 +537,8 @@ void taosCacheCleanup(SCacheObj *pCacheObj) {
|
||||||
pCacheObj->deleting = 1;
|
pCacheObj->deleting = 1;
|
||||||
|
|
||||||
// wait for the refresh thread quit before destroying the cache object.
|
// wait for the refresh thread quit before destroying the cache object.
|
||||||
while(atomic_load_8(&pCacheObj->deleting) != 0) {
|
// But in the dll, the child thread will be killed before atexit takes effect.So here we only wait for 2 seconds.
|
||||||
|
for (int i = 0; i < 40&&atomic_load_8(&pCacheObj->deleting) != 0; i++) {
|
||||||
taosMsleep(50);
|
taosMsleep(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class TDSimClient:
|
||||||
self.cfgDict.update({option: value})
|
self.cfgDict.update({option: value})
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ class TDDnode:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class TDSimClient:
|
||||||
self.cfgDict.update({option: value})
|
self.cfgDict.update({option: value})
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ class TDDnode:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class TDSimClient:
|
||||||
self.cfgDict.update({option: value})
|
self.cfgDict.update({option: value})
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ class TDDnode:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
from time import sleep
|
from time import sleep
|
||||||
from util.log import *
|
from util.log import *
|
||||||
|
@ -58,7 +59,7 @@ class TDSimClient:
|
||||||
self.cfgDict.update({option: value})
|
self.cfgDict.update({option: value})
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
@ -243,7 +244,7 @@ class TDDnode:
|
||||||
projPath = selfPath[:selfPath.find("tests")]
|
projPath = selfPath[:selfPath.find("tests")]
|
||||||
|
|
||||||
for root, dirs, files in os.walk(projPath):
|
for root, dirs, files in os.walk(projPath):
|
||||||
if ("taosd" in files):
|
if (("taosd") in files):
|
||||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||||
if ("packaging" not in rootRealPath):
|
if ("packaging" not in rootRealPath):
|
||||||
buildPath = root[:len(root)-len("/build/bin")]
|
buildPath = root[:len(root)-len("/build/bin")]
|
||||||
|
@ -401,7 +402,7 @@ class TDDnode:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
def cfg(self, option, value):
|
def cfg(self, option, value):
|
||||||
cmd = "echo '%s %s' >> %s" % (option, value, self.cfgPath)
|
cmd = "echo %s %s >> %s" % (option, value, self.cfgPath)
|
||||||
if os.system(cmd) != 0:
|
if os.system(cmd) != 0:
|
||||||
tdLog.exit(cmd)
|
tdLog.exit(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue