internal static ConnectionResult OsDbConnectionRetry (OSoperations osDbOperations, ConnectionResult connectionResult) { MainImportingEngine.ThisProgress.Progress (MainImportingEngine.CurrentProgress, "OSdb did not respond. Retrying... "); Thread.Sleep(2000); try { connectionResult.OsDbLoginResult = osDbOperations.SiteLogin(); MainImportingEngine.ThisProgress.Progress (MainImportingEngine.CurrentProgress, "login status: " + connectionResult.OsDbLoginResult.status); Thread.Sleep(3000); connectionResult.OSDbIsOnline = true; } catch (Exception) { connectionResult = DisableOsDbConnection(connectionResult); } return connectionResult; }
internal static ConnectionResult OsDbConnectionFirstTry (OSoperations osDbOperations, ConnectionResult connectionResult) { connectionResult.OsDbLoginResult = osDbOperations.SiteLogin(); MainImportingEngine.ThisProgress.Progress (MainImportingEngine.CurrentProgress, "login status: " + connectionResult.OsDbLoginResult.status); Thread.Sleep(3000); connectionResult.OSDbIsOnline = true; return connectionResult; }