12345678910111213141516171819202122232425262728 |
- using Quartz;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using XYY.Tool.QuotaReduction;
- namespace XYY.Tool.TimingTask.jobs
- {
- public class PushESBTrackMonitorJob : IJob
- {
- public async Task Execute(IJobExecutionContext context)
- {
- RestSharp.RestClient client = new RestSharp.RestClient(JobConfig.PushESBTrackMonitorApi);
- RestSharp.RestRequest request = new RestSharp.RestRequest(RestSharp.Method.GET);
- request.AddHeader("Authorization", "token 985833DB91DA7B38C3918D3F1F9D2339");
- client.Timeout = -1;
- var response = client.Execute(request);
- if (response.StatusCode != System.Net.HttpStatusCode.OK)
- {
- string msg = "异常轨迹文件推送失败" + (response.ErrorMessage ?? response.Content);
- dingApiRequest.sendMessageToWeChat("PushESBTrackMonitorJob", msg, new List<string>() { "LiuZhengKai" });
- }
-
- }
- }
- }
|