增加不停升级功能

This commit is contained in:
2026-01-19 10:19:20 +08:00
parent b48907796f
commit 46705123bf
2 changed files with 135 additions and 7 deletions

View File

@@ -1,8 +1,3 @@
using System.Buffers;
using System.Data;
using System.IO.Pipelines;
using System.Runtime.CompilerServices;
using System.Text;
using BLW_Log.Controllers;
using BLW_Log.Models;
using BLW_Log.Push;
@@ -21,6 +16,12 @@ using NLog;
using NLog.Extensions.Logging;
using NLog.Web;
using Quartz;
using RestSharp;
using System.Buffers;
using System.Data;
using System.IO.Pipelines;
using System.Runtime.CompilerServices;
using System.Text;
using static IronPython.Modules.PythonCsvModule;
namespace BLW_Log
{
@@ -32,7 +33,7 @@ namespace BLW_Log
{
public static void Main(string[] args)
{
//var N = DateTime.Now.ToString("yyyy-MM-dd#HH:mm:ss:fff");
//var N = DateTime.Now.ToString("yyyy-MM-dd#HH:mm:ss:fff");
var builder = WebApplication.CreateBuilder(args);
//builder.Services.AddSingleton<MyMemoryCache>();
@@ -102,7 +103,13 @@ namespace BLW_Log
}
};
});
builder.Services.AddSingleton<Dictionary<string, IRestClient>>(provider =>
{
return new Dictionary<string, IRestClient>
{
["NoStopShengJi"] = new RestClient("https://www.boonlive-rcu.com/"),
};
});
string ttt1 = builder.Configuration["ExcelGenerater"].ToString();
string[] ssk1 = ttt1.Split(',');
@@ -167,6 +174,16 @@ namespace BLW_Log
}) // ÿ<><C3BF>17:00
);
//<2F><>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD>
var jobKey5 = new JobKey("BuTingShengJi");
q.AddJob<ExcelScan>(opts => opts.WithIdentity(jobKey5));
q.AddTrigger(opts => opts
.ForJob(jobKey5)
.WithIdentity("BuTingShengJi-trigger")
.StartAt(DateTimeOffset.Now.AddMinutes(1))
);
});
builder.Services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);
builder.Services.AddSignalR();