@@ -16,12 +16,12 @@ namespace IRaCIS.Core.API
|
||||
services.AddHangfire(hangFireConfig =>
|
||||
{
|
||||
//本地window 调试 使用内存,服务器部署使用数据库,防止服务器任务调度到本地
|
||||
//if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
//{
|
||||
// hangFireConfig.UseInMemoryStorage();
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
hangFireConfig.UseInMemoryStorage();
|
||||
|
||||
//}
|
||||
//else
|
||||
}
|
||||
else
|
||||
{
|
||||
//指定存储介质
|
||||
hangFireConfig.UseSqlServerStorage(hangFireConnStr, new SqlServerStorageOptions()
|
||||
|
||||
Reference in New Issue
Block a user