ComplianceServer/oldcode/CoreService/Order/UserCenterEvent.cs

49 lines
1.1 KiB
C#

using Quartz;
using System;
using System.Text;
using WX.CRM.Common;
namespace CRM.Core.CoreService.Order
{
public class UserCenterEvent
{
public void Exe()
{
try
{
LogHelper.Info("推送用户中心事件开始");
var url = "http://localhost:7033/EventService.svc/Event/Get";
Utility.GetData(url, string.Empty, Encoding.UTF8);
LogHelper.Info("推送用户中心事件结束");
}
catch (Exception ex)
{
LogHelper.Error(ex);
}
}
}
public class UserCenterEventJob : IJob
{
static bool runnding = false;
public void Execute(JobExecutionContext context)
{
if (runnding)
return;
runnding = true;
try
{
new UserCenterEvent().Exe();
}
catch (Exception e)
{
LogHelper.Error(e);
}
finally
{
runnding = false;
}
}
}
}