提交 2f1cc7ae 编写于 作者: D dapan1121

enh: refactor scheduler code

上级 9e00672c
......@@ -41,6 +41,10 @@ SSchStatusFps gSchTaskFps[JOB_TASK_STATUS_MAX] = {
{JOB_TASK_STATUS_DROP, schTaskStatusNullEnter, schTaskStatusNullLeave, schTaskStatusNullEvent},
};
int32_t schSwitchJobStatus(int32_t status, SSchJob* pJob, void* pParam) {
schJobStatusEnter(pJob, status, pParam);
}
......@@ -75,6 +75,14 @@ int32_t schedulerExecJob(SSchedulerReq *pReq, int64_t *pJobId) {
SCH_ERR_RET(schJobStatusEnter(&pJob, JOB_TASK_STATUS_INIT, pReq));
SSchEvent event = {0};
event.event = SCH_EVENT_BEGIN_OP;
SSchOpEvent opEvent = {0};
opEvent.type = SCH_OP_EXEC;
opEvent.begin = true;
opEvent.pReq = pReq;
schJobHandleEvent(pJob, &event);
SCH_ERR_RET(schJobStatusEnter(&pJob, JOB_TASK_STATUS_EXEC, pReq));
*pJobId = pJob->refId;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册