refactor: do some internal refactor.
This commit is contained in:
parent
4fee5ba59a
commit
037a232bfa
|
@ -41,16 +41,16 @@ enum {
|
||||||
STREAM_STATUS__PAUSE,
|
STREAM_STATUS__PAUSE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
typedef enum ETaskStatus {
|
||||||
TASK_STATUS__NORMAL = 0,
|
TASK_STATUS__NORMAL = 0,
|
||||||
TASK_STATUS__DROPPING,
|
TASK_STATUS__DROPPING,
|
||||||
TASK_STATUS__FAIL,
|
TASK_STATUS__UNINIT, // not used, an placeholder
|
||||||
TASK_STATUS__STOP,
|
TASK_STATUS__STOP,
|
||||||
TASK_STATUS__SCAN_HISTORY, // stream task scan history data by using tsdbread in the stream scanner
|
TASK_STATUS__SCAN_HISTORY, // stream task scan history data by using tsdbread in the stream scanner
|
||||||
TASK_STATUS__HALT, // pause, but not be manipulated by user command
|
TASK_STATUS__HALT, // pause, but not be manipulated by user command
|
||||||
TASK_STATUS__PAUSE, // pause
|
TASK_STATUS__PAUSE, // pause
|
||||||
TASK_STATUS__CK, // stream task is in checkpoint status, no data are allowed to put into inputQ anymore
|
TASK_STATUS__CK, // stream task is in checkpoint status, no data are allowed to put into inputQ anymore
|
||||||
};
|
} ETaskStatus;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TASK_SCHED_STATUS__INACTIVE = 1,
|
TASK_SCHED_STATUS__INACTIVE = 1,
|
||||||
|
|
|
@ -1567,8 +1567,8 @@ static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock
|
||||||
} else if (taskStatus == TASK_STATUS__DROPPING) {
|
} else if (taskStatus == TASK_STATUS__DROPPING) {
|
||||||
memcpy(varDataVal(status), "dropping", 8);
|
memcpy(varDataVal(status), "dropping", 8);
|
||||||
varDataSetLen(status, 8);
|
varDataSetLen(status, 8);
|
||||||
} else if (taskStatus == TASK_STATUS__FAIL) {
|
} else if (taskStatus == TASK_STATUS__UNINIT) {
|
||||||
memcpy(varDataVal(status), "fail", 4);
|
memcpy(varDataVal(status), "uninit", 6);
|
||||||
varDataSetLen(status, 4);
|
varDataSetLen(status, 4);
|
||||||
} else if (taskStatus == TASK_STATUS__STOP) {
|
} else if (taskStatus == TASK_STATUS__STOP) {
|
||||||
memcpy(varDataVal(status), "stop", 4);
|
memcpy(varDataVal(status), "stop", 4);
|
||||||
|
|
Loading…
Reference in New Issue