This commit is contained in:
5
dist/win-x64/start.bat
vendored
5
dist/win-x64/start.bat
vendored
@@ -1,4 +1,5 @@
|
||||
start .\PostgreSQLPortable_12.1\PostgreSQLPortable.exe
|
||||
start "PostgreSQLServer" /MAX .\PostgreSQLPortable_12.1\PostgreSQLPortable.exe
|
||||
cd .\files
|
||||
start ayanova.exe --AYANOVA_DB_CONNECTION="Server=localhost;Username=postgres;Password=raven;Database=AyaNova;" --AYANOVA_DEFAULT_TRANSLATION="en" --AYANOVA_USE_URLS="http://*:7575;" --AYANOVA_BACKUP_PG_DUMP_PATH=".\PostgreSQLPortable\App\PgSQL\bin\" --AYANOVA_FOLDER_USER_FILES= ".\data\userfiles" --AYANOVA_FOLDER_BACKUP_FILES=".\data\backupfiles"
|
||||
start "AyaNova Server" /MAX ayanova.exe --AYANOVA_DB_CONNECTION="Server=localhost;Username=postgres;Password=mypasswordforpostgres;Database=AyaNova;" --AYANOVA_DEFAULT_TRANSLATION="en" --AYANOVA_USE_URLS="http://*:7575;" --AYANOVA_BACKUP_PG_DUMP_PATH=".\PostgreSQLPortable\App\PgSQL\bin\" --AYANOVA_FOLDER_USER_FILES= ".\data\userfiles" --AYANOVA_FOLDER_BACKUP_FILES=".\data\backupfiles"
|
||||
timeout 10
|
||||
start "" http://localhost:7575/api/v8/
|
||||
@@ -129,7 +129,7 @@ namespace AyaNova
|
||||
DbUtil.ParseConnectionString(_newLog, _connectionString);
|
||||
|
||||
//Probe for database server
|
||||
//Will retry every 10 seconds for up to 5 minutes before bailing
|
||||
//Will retry every 5 seconds for up to 5 minutes before bailing
|
||||
if (!DbUtil.DatabaseServerExists(_newLog, "Waiting for db server "))
|
||||
{
|
||||
var err = $"E1000 - AyaNova can't connect to the database server after trying for 5 minutes (connection string is:\"{DbUtil.DisplayableConnectionString}\")";
|
||||
|
||||
@@ -128,10 +128,10 @@ namespace AyaNova.Util
|
||||
|
||||
try
|
||||
{
|
||||
//Try every 10 seconds for 30 tries before giving up (5 minutes total)
|
||||
//Try every 5 seconds for 60 tries before giving up (5 minutes total)
|
||||
|
||||
var maxRetryAttempts = 30;
|
||||
var pauseBetweenFailures = TimeSpan.FromSeconds(10);
|
||||
var maxRetryAttempts = 60;
|
||||
var pauseBetweenFailures = TimeSpan.FromSeconds(5);
|
||||
RetryHelper.RetryOnException(maxRetryAttempts, pauseBetweenFailures, log, logPrepend + DisplayableConnectionString, () =>
|
||||
{
|
||||
using (var conn = new Npgsql.NpgsqlConnection(AdminConnectionString))
|
||||
|
||||
Reference in New Issue
Block a user