perf: reduce connection timeouts to 3s and default config to Demo mode to prevent offline delays

This commit is contained in:
2026-10-20 20:40:23 +09:00
parent 45fd71fe9a
commit 8ff4021f42
4 changed files with 39 additions and 38 deletions
+2 -1
View File
@@ -44,7 +44,8 @@ SELECT
$useLive = if ($Config -and $Config.MsSql) { [bool]$Config.MsSql.UseLive } else { $false }
if ($useLive) {
try {
$connStr = Build-SqlConnectionString -Server $Config.MsSql.Server -AuthType $Config.MsSql.AuthType -Username $Config.MsSql.Username -Password $Config.MsSql.Password
$timeout = if ($Config.MsSql.ConnectionTimeout) { [int]$Config.MsSql.ConnectionTimeout } else { 3 }
$connStr = Build-SqlConnectionString -Server $Config.MsSql.Server -AuthType $Config.MsSql.AuthType -Username $Config.MsSql.Username -Password $Config.MsSql.Password -Timeout $timeout
$conn = New-Object System.Data.SqlClient.SqlConnection($connStr)
$conn.Open()
$cmd = $conn.CreateCommand()