fix:手动执行网络型任务失败
This commit is contained in:
parent
e16997a204
commit
6a0a3beab5
@ -46,7 +46,7 @@ namespace ZR.Tasks
|
||||
RefireImmediately = true
|
||||
};
|
||||
status = 1;
|
||||
logMsg = $"Fail,Exception:{ex.Message}";
|
||||
logMsg = $"Job Run Fail,Exception:{ex.Message}";
|
||||
}
|
||||
|
||||
var logModel = new SysTasksLog()
|
||||
|
||||
@ -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}网络请求执行失败,任务不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user