fix:手动执行网络型任务失败

This commit is contained in:
不做码农 2022-07-09 12:44:52 +08:00
parent e16997a204
commit 6a0a3beab5
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ namespace ZR.Tasks
RefireImmediately = true
};
status = 1;
logMsg = $"FailException{ex.Message}";
logMsg = $"Job Run FailException{ex.Message}";
}
var logModel = new SysTasksLog()

View File

@ -29,7 +29,7 @@ namespace ZR.Tasks.TaskScheduler
public async Task Run(IJobExecutionContext context)
{
AbstractTrigger trigger = (context as JobExecutionContextImpl).Trigger as AbstractTrigger;
var info = await tasksQzService.GetByIdAsync(trigger.Name);
var info = await tasksQzService.GetByIdAsync(trigger.JobName);
if (info != null)
{
var result = await HttpHelper.HttpGetAsync("http://" + info.ApiUrl);
@ -37,7 +37,7 @@ namespace ZR.Tasks.TaskScheduler
}
else
{
throw new CustomException("任务网络请求执行失败,任务不存在");
throw new CustomException($"任务{trigger?.JobName}网络请求执行失败,任务不存在");
}
}
}