/// <summary>
        /// 启动任务
        /// </summary>
        /// <param name="jobId">任务编号</param>
        /// <returns></returns>
        public JsonResult RunJob(int jobId)
        {
            var ajaxResponseData = _operateJob(jobId, (jobDetail) =>
            {
                //if (jobDetail.TriggerState == -1)
                //{
                //    jobDetail.TriggerState = -2;
                //} else if (jobDetail.TriggerState == 1)
                //{
                //    jobDetail.TriggerState = 6;
                //}
                //_customerJobInfoRepository.UpdateCustomerJobInfo(jobDetail);
                return(_triggerBase.RunJob(jobDetail));
            });

            //ChangeCustomerJobState(jobId, -2);
            return(Json(ajaxResponseData));
        }
Exemplo n.º 2
0
        public JsonResult RunJob(int jobId)
        {
            var ajaxResponseData = _operateJob(jobId, (jobDetail) => { return(_triggerBase.RunJob(jobDetail)); });

            return(Json(ajaxResponseData));
        }