fix(util): idle 500ms after kill rsync
This commit is contained in:
parent
923eaaa569
commit
5cbd733cab
|
@ -118,16 +118,20 @@ void stopRsync() {
|
|||
#else
|
||||
system("pkill rsync");
|
||||
#endif
|
||||
|
||||
if (code != 0) {
|
||||
uError("[rsync] stop rsync server failed," ERRNO_ERR_FORMAT, ERRNO_ERR_DATA);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
uDebug("[rsync] stop rsync server successful");
|
||||
}
|
||||
|
||||
taosMsleep(500); // sleep 500 ms to wait for the completion of kill operation.
|
||||
}
|
||||
|
||||
void startRsync() {
|
||||
if (taosMulMkDir(tsCheckpointBackupDir) != 0) {
|
||||
uError("[rsync] build checkpoint backup dir failed, dir:%s,"ERRNO_ERR_FORMAT, tsCheckpointBackupDir, ERRNO_ERR_DATA);
|
||||
uError("[rsync] build checkpoint backup dir failed, path:%s," ERRNO_ERR_FORMAT, tsCheckpointBackupDir,
|
||||
ERRNO_ERR_DATA);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -147,10 +151,10 @@ void startRsync() {
|
|||
code = system(cmd);
|
||||
if (code != 0) {
|
||||
uError("[rsync] start server failed, code:%d," ERRNO_ERR_FORMAT, code, ERRNO_ERR_DATA);
|
||||
return;
|
||||
} else {
|
||||
uDebug("[rsync] start server successful");
|
||||
}
|
||||
|
||||
uDebug("[rsync] start server successful");
|
||||
}
|
||||
|
||||
int32_t uploadByRsync(const char* id, const char* path) {
|
||||
|
|
Loading…
Reference in New Issue