update:跟随框架升级去掉雪花id相关的代码

This commit is contained in:
2021-05-25 16:13:34 +08:00
parent 8977c1e1cc
commit 8d3295531d
6 changed files with 8 additions and 9 deletions

View File

@@ -1,6 +1,5 @@
using Ewide.Core;
using Furion;
using Furion.Snowflake;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
@@ -39,8 +38,8 @@ namespace Ewide.Web.Core
services.AddViewEngine();
// 设置雪花id的workerId确保每个实例workerId都应不同
var workerId = ushort.Parse(App.Configuration["SnowId:WorkerId"] ?? "1");
IDGenerator.SetIdGenerator(new IDGeneratorOptions { WorkerId = workerId });
//var workerId = ushort.Parse(App.Configuration["SnowId:WorkerId"] ?? "1");
//IDGenerator.SetIdGenerator(new IDGeneratorOptions { WorkerId = workerId });
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)