убрал сброс соединения. сделал удаление папок новых пакетов при их удалении с бд

This commit is contained in:
2023-12-15 15:45:43 +03:00
parent 57a98475d0
commit 730ded1f4c
3 changed files with 27 additions and 13 deletions

View File

@@ -151,15 +151,16 @@ public abstract class TestingPlanner<P extends TestingPackage> {
Kill();
UpdatePackageState(TasksPackageState.Aborted);
EmailPackage();
} else
} else {
Session();
}
}
} catch (Exception ex) {
Print("Ошибка сеанса.");
Print("Ошибка сеанса. Соединение будет разорвано.");
Print(ex.getMessage());
} finally {
Disconnect();
}
} finally {}
}
//--
testingPackage.destructor();

View File

@@ -371,16 +371,24 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
}
@Override
protected boolean Connect() {
try {
user.connection = null;
user.connection = new UserConnection(machine, user);
Print("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
} catch (Exception ex) {
Print(ex.toString());
user.connection = null;
Print("Не удалось установить соединение.");
if (user.connection==null) {
try {
user.connection = new UserConnection(machine, user);
Print("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
} catch (Exception ex) {
Print(ex.toString());
user.connection = null;
Print("Не удалось установить соединение.");
}
}
return user.connection != null;
}
@Override
protected void Disconnect() {
if (user.connection != null) {
user.connection.Disconnect();
user.connection = null;
}
}
//--
}