public void RestAll() { //TasksManage.GetInstance().RemoveAllTask(); //var listTask = GetNormTask(); //foreach (var task in listTask) //{ // RestTask(task); //} TasksManage.GetInstance().SetAllTask(GetNormExecTaskInfo()); }
public void StartUp() { var listTask = GetNormTask(); TasksManage taskManager = TasksManage.GetInstance(); foreach (var task in listTask) { taskManager.SetTask(new ExecTaskInfo(task, GetTaskExecByGuid(task.Guid))); } taskManager.OnTaskExecAfter += TaskManager_OnTaskExecAfter; taskManager.OnTaskExecBefore += TaskManager_OnTaskExecBefore; taskManager.StartUp(GetNormExecTaskInfo); }
public bool RunTask(string TaskGuid) { var task = _ormTasks.Find(w => w.Guid == TaskGuid); if (task == null) { throw new BOException("找不到任务ID"); } var taskinfo = new ExecTaskInfo(task, GetTaskExecByGuid(task.Guid)); var taskManager = TasksManage.GetInstance(); taskManager.OnTaskExecAfter += TaskManager_OnTaskExecAfter; taskManager.OnTaskExecBefore += TaskManager_OnTaskExecBefore; taskManager.RunTask(taskinfo); return(true); }
public void RestTask(Ts_Tasks task) { TasksManage.GetInstance().SetTask(new ExecTaskInfo(task, GetTaskExecByGuid(task.Guid))); }