fix(stream): check the status before exec stream task when handling the dispatch requests.

This commit is contained in:
Haojun Liao 2023-09-20 16:32:27 +08:00
parent 2418f509ea
commit 8329ec79f2
1 changed files with 7 additions and 3 deletions

View File

@ -255,10 +255,14 @@ int32_t streamProcessDispatchMsg(SStreamTask* pTask, SStreamDispatchReq* pReq, S
tDeleteStreamDispatchReq(pReq);
int8_t schedStatus = streamTaskSetSchedStatusWait(pTask);
if (schedStatus == TASK_SCHED_STATUS__INACTIVE) {
streamTryExec(pTask);
int8_t st = pTask->status.taskStatus;
if (st == TASK_STATUS__NORMAL || st == TASK_STATUS__SCAN_HISTORY || st == TASK_STATUS__CK) {
int8_t schedStatus = streamTaskSetSchedStatusWait(pTask);
if (schedStatus == TASK_SCHED_STATUS__INACTIVE) {
streamTryExec(pTask);
}
}
return 0;
}