This commit is contained in:
不做码农
2022-07-01 20:13:05 +08:00
10 changed files with 96 additions and 84 deletions

View File

@@ -16,6 +16,7 @@ namespace ZR.Tasks.TaskScheduler
internal class Job_HttpRequest : JobBase, IJob
{
private readonly ISysTasksQzService tasksQzService;
private readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
public Job_HttpRequest(ISysTasksQzService tasksQzService)
{
@@ -32,7 +33,11 @@ namespace ZR.Tasks.TaskScheduler
if (info != null)
{
var result = await HttpHelper.HttpGetAsync("http://" + info.ApiUrl);
Console.WriteLine(result);
logger.Info($"任务【{info.Name}】网络请求执行结果=" + result);
}
else
{
throw new CustomException("任务网络请求执行失败,任务不存在");
}
}
}