refactor: do some internal refactor.

This commit is contained in:
Haojun Liao 2023-07-21 09:14:25 +08:00
parent 0d1c4f9ee2
commit bd8b811b9d
1 changed files with 4 additions and 3 deletions

View File

@ -785,12 +785,13 @@ void streamTaskPause(SStreamTask* pTask) {
// todo fix race condition // todo fix race condition
void streamTaskDisablePause(SStreamTask* pTask) { void streamTaskDisablePause(SStreamTask* pTask) {
// pre-condition check // pre-condition check
const char* id = pTask->id.idStr;
while (pTask->status.taskStatus == TASK_STATUS__PAUSE) { while (pTask->status.taskStatus == TASK_STATUS__PAUSE) {
taosMsleep(10); taosMsleep(100);
qDebug("s-task:%s already in pause, wait for pause being cancelled, and then set pause disabled", pTask->id.idStr); qDebug("s-task:%s already in pause, wait for pause being cancelled, and set pause disabled, check in 100ms", id);
} }
qDebug("s-task:%s disable task pause", pTask->id.idStr); qDebug("s-task:%s disable task pause", id);
pTask->status.pauseAllowed = 0; pTask->status.pauseAllowed = 0;
} }