忽略dll文件git
This commit is contained in:
@@ -1,42 +1,42 @@
|
||||
using Hncore.Infrastructure.Common;
|
||||
using Hncore.Pass.Vpn.Service;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
namespace Hncore.Pass.Vpn.Job
|
||||
{
|
||||
/// <summary>
|
||||
/// 充值失败尝试job
|
||||
/// </summary>
|
||||
public class ChargeTryJob
|
||||
{
|
||||
public static void Start(IServiceProvider serviceProvider)
|
||||
{
|
||||
Task.Run(async () => { await Execute(serviceProvider); });
|
||||
}
|
||||
|
||||
private static async Task Execute(IServiceProvider serviceProvider)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
LogHelper.Trace("开始处理订单");
|
||||
try
|
||||
{
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
var agentService = scope.ServiceProvider.GetService<AgentService>();
|
||||
await agentService.FaildTry();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogHelper.Error("处理订单失败", e);
|
||||
break;
|
||||
}
|
||||
await Task.Delay(10 * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
using Hncore.Infrastructure.Common;
|
||||
using Hncore.Pass.Vpn.Service;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
namespace Hncore.Pass.Vpn.Job
|
||||
{
|
||||
/// <summary>
|
||||
/// 充值失败尝试job
|
||||
/// </summary>
|
||||
public class ChargeTryJob
|
||||
{
|
||||
public static void Start(IServiceProvider serviceProvider)
|
||||
{
|
||||
Task.Run(async () => { await Execute(serviceProvider); });
|
||||
}
|
||||
|
||||
private static async Task Execute(IServiceProvider serviceProvider)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
LogHelper.Trace("开始处理订单");
|
||||
try
|
||||
{
|
||||
using (var scope = serviceProvider.CreateScope())
|
||||
{
|
||||
var agentService = scope.ServiceProvider.GetService<AgentService>();
|
||||
await agentService.FaildTry();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogHelper.Error("处理订单失败", e);
|
||||
break;
|
||||
}
|
||||
await Task.Delay(10 * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user