улучшение описания пакетов

This commit is contained in:
2024-10-03 16:21:11 +03:00
parent 76b6a36de6
commit 4ad0a32238
12 changed files with 88 additions and 44 deletions

View File

@@ -41,14 +41,29 @@ public abstract class TestingPlanner<P extends TestingPackage> extends Repositor
break;
}
}
protected void UpdatePackageState() throws Exception {
testingPackage.ChangeDate = new Date().getTime();
ServerCommand(ServerCode.EditObject, testingPackage);
switch (testingPackage.state) {
case Done:
case DoneWithErrors:
case Aborted:
case CompilationExecution:
case RunningExecution:
EmailPackage();
break;
}
}
void UpdatePackage() throws Exception {
testingPackage.ChangeDate = new Date().getTime();
ServerCommand(ServerCode.EditObject, testingPackage);
}
public abstract String packageDescription();
void EmailPackage() throws Exception {
if (testingPackage.needsEmail == 1) {
EmailMessage message = new EmailMessage();
message.subject = "Состояние пакета задач " + Utils.Brackets(testingPackage) + " изменилось на " + Utils.Brackets(testingPackage.state.getDescription());
message.subject = "Состояние пакета тестирования "+packageDescription()+ " "+
Utils.Brackets(testingPackage.id) + " изменилось на " + Utils.Brackets(testingPackage.state.getDescription());
message.text = testingPackage.description;
message.targets.add(testingPackage.sender_address);
ServerCommand(ServerCode.Email, message);