超时时间设置为90s
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
hang 2026-03-23 16:38:32 +08:00
parent 04f971e24f
commit 8c6b73c236
1 changed files with 3 additions and 2 deletions

View File

@ -40,12 +40,12 @@ namespace IRaCIS.Core.API
var dbType = configuration.GetSection("ConnectionStrings:Db_Type").Value; var dbType = configuration.GetSection("ConnectionStrings:Db_Type").Value;
if (!string.IsNullOrWhiteSpace(dbType) && dbType == "pgsql") if (!string.IsNullOrWhiteSpace(dbType) && dbType == "pgsql")
{ {
options.UseNpgsql(configuration.GetSection("ConnectionStrings:RemoteNew").Value, contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure()); options.UseNpgsql(configuration.GetSection("ConnectionStrings:RemoteNew").Value, contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure().CommandTimeout(90));
} }
else else
{ {
options.UseSqlServer(configuration.GetSection("ConnectionStrings:RemoteNew").Value, contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure()); options.UseSqlServer(configuration.GetSection("ConnectionStrings:RemoteNew").Value, contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure().CommandTimeout(90));
} }
@ -91,6 +91,7 @@ namespace IRaCIS.Core.API
}); });
}); });
// Register an additional context factory as a Scoped service, which gets a pooled context from the Singleton factory we registered above, // Register an additional context factory as a Scoped service, which gets a pooled context from the Singleton factory we registered above,