Beispiel #1
0
        public void RestAll()
        {
            //TasksManage.GetInstance().RemoveAllTask();
            //var listTask = GetNormTask();
            //foreach (var task in listTask)
            //{
            //    RestTask(task);
            //}

            TasksManage.GetInstance().SetAllTask(GetNormExecTaskInfo());
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
 public void RestTask(Ts_Tasks task)
 {
     TasksManage.GetInstance().SetTask(new ExecTaskInfo(task, GetTaskExecByGuid(task.Guid)));
 }