удаление отладочной печати сравнения и не только
This commit is contained in:
@@ -65,12 +65,10 @@ public abstract class Component extends DBObject implements Loggable {
|
||||
}
|
||||
public void ReplaceOldFile() throws Exception {
|
||||
Utils.delete_with_check(getFile());
|
||||
System.out.println("old file removed");
|
||||
//-скопировать файл
|
||||
Files.move(getNewFile().toPath(), getFile().toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
//удалить новый файл.
|
||||
Utils.delete_with_check(getNewFile());
|
||||
System.out.println("new file removed");
|
||||
}
|
||||
public void Update() throws Exception {
|
||||
if (!getNewFile().setExecutable(true)) throw new PassException("Не удалось разрешить файл\n" +
|
||||
|
||||
@@ -64,8 +64,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
public void ReadMessageIn() throws Exception {
|
||||
message_in = (MessageJtoJ) in.readObject();
|
||||
System.out.println("message = " + Utils.DQuotes(message_in.getMessage()));
|
||||
System.out.println("command = " + Utils.DQuotes(message_in.getCommand()));
|
||||
}
|
||||
public void SendMessageOut(MessageJtoJ messageJtoJ) throws Exception {
|
||||
message_out = messageJtoJ;
|
||||
@@ -73,8 +71,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
public void ConvertStatistic() throws Exception {
|
||||
message_in = (MessageJtoJ) in.readObject();
|
||||
System.out.println("message = " + Utils.DQuotes(message_in.getMessage()));
|
||||
System.out.println("command = " + Utils.DQuotes(message_in.getCommand()));
|
||||
String message = Current.getSapfor().readStatForAnalyzer(message_in.getMessage());
|
||||
message_out = new MessageJtoJ(message, message_in.getCommand());
|
||||
out.writeObject(message_out);
|
||||
@@ -85,7 +81,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
server_thread = new Thread(() -> {
|
||||
try {
|
||||
client = serverSocket.accept();
|
||||
System.out.println("Основной цикл анализатора статистик начат..");
|
||||
out = new ObjectOutputStream(client.getOutputStream());
|
||||
in = new ObjectInputStream(client.getInputStream());
|
||||
//------------------------------------------------------->>;
|
||||
@@ -95,26 +90,17 @@ public class PerformanceAnalyzer extends Component {
|
||||
}
|
||||
});
|
||||
server_thread.start();
|
||||
System.out.println("Нить сервера запущена");
|
||||
}
|
||||
@Override
|
||||
public void GetVersionInfo() {
|
||||
try {
|
||||
StartServer(() -> {
|
||||
System.out.println("Запрос версии анализатора..");
|
||||
ReadMessageIn(); //на версию.
|
||||
version = (long) Double.parseDouble(message_in.getMessage());
|
||||
ReadMessageIn(); //на дату.
|
||||
date_text = message_in.getMessage();
|
||||
System.out.println("Завершено");
|
||||
return null;
|
||||
});
|
||||
//--
|
||||
/*
|
||||
Utils.performProcess("java", "-jar",
|
||||
"-Dprism.order=sw",
|
||||
Utils.DQuotes(Global.performanceAnalyzer.getFile()), "--port", String.valueOf(getPort()), "--version");
|
||||
*/
|
||||
Utils.startScript(Global.TempDirectory, Global.ComponentsDirectory, "analyzer",
|
||||
"java -jar -Dprism.order=sw "+ Utils.DQuotes(Global.performanceAnalyzer.getFile()) + " --port "+ getPort()+ " --version" );
|
||||
//-
|
||||
@@ -123,7 +109,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
Shutdown();
|
||||
System.out.println("FINALIZE");
|
||||
}
|
||||
}
|
||||
public void ServerBody() {
|
||||
@@ -153,7 +138,6 @@ public class PerformanceAnalyzer extends Component {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
Shutdown();
|
||||
System.out.println("FINALIZE");
|
||||
isActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
}
|
||||
protected Thread interruptThread = new InterruptThread(10000,
|
||||
() -> {
|
||||
System.out.println("INTERRUPT FILE FOUND");
|
||||
System.exit(0);
|
||||
return null;
|
||||
});
|
||||
@@ -77,7 +76,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
Log = new FileWriter("Log.txt", true);
|
||||
String dmessage = Utils.Brackets("SESSION -> ") + new Date() +
|
||||
" " + message;
|
||||
System.out.println(dmessage);
|
||||
Log.write(dmessage + "\n");
|
||||
Log.close();
|
||||
} catch (Exception ex) {
|
||||
@@ -90,7 +88,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
public void Email(EmailMessage message_in, File... directAttachements) throws Exception {
|
||||
checkTargets(message_in);
|
||||
Thread thread = new Thread(() -> {
|
||||
System.out.println("EMAIL THREAD STARTED");
|
||||
try {
|
||||
Properties props = new Properties();
|
||||
props.put("mail.smtp.host", Global.properties.SMTPHost);
|
||||
@@ -122,7 +119,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
}
|
||||
});
|
||||
for (String target : targets_) {
|
||||
System.out.println("target=" + target);
|
||||
boolean done = false;
|
||||
int attempts = 5;
|
||||
while (!done && (attempts > 0)) {
|
||||
@@ -153,7 +149,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
}
|
||||
message.setContent(multipart);
|
||||
Transport.send(message);
|
||||
System.out.println("message sent");
|
||||
done = true;
|
||||
} catch (Exception ex) {
|
||||
System.out.println("Исключение во время отправки сообщения абоненту " + Utils.Brackets(target));
|
||||
@@ -168,7 +163,6 @@ public abstract class RepositoryServer<D extends Database> {
|
||||
System.out.println("Исключение во время выполнения рассылки.");
|
||||
ex.printStackTrace();
|
||||
}
|
||||
System.out.println("EMAIL THREAD ENDED");
|
||||
});
|
||||
thread.start();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
targets
|
||||
);
|
||||
Email(message);
|
||||
System.out.println("EMAIL ON START DONE");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -252,8 +251,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
Utils.ReadAllText(vFile),
|
||||
"\n", "\r"
|
||||
);
|
||||
System.out.println(vFile.getAbsolutePath());
|
||||
System.out.println(Utils.DQuotes(v_string));
|
||||
response_actual_versions_.put(componentType, v_string);
|
||||
}
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
@@ -270,8 +267,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
Utils.ReadAllText(vFile),
|
||||
"\n", "\r"
|
||||
);
|
||||
System.out.println(vFile.getAbsolutePath());
|
||||
System.out.println(Utils.DQuotes(mv_string));
|
||||
response_minimal_versions_.put(componentType, mv_string);
|
||||
}
|
||||
response = new ServerExchangeUnit_2021(ServerCode.OK);
|
||||
@@ -311,7 +306,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
String output = "";
|
||||
for (String fileName : filesNames) {
|
||||
File program = Paths.get(project.getAbsolutePath(), fileName).toFile();
|
||||
System.out.println(program.getAbsolutePath());
|
||||
//--
|
||||
File convertedProgram = Paths.get(program.getParent(),
|
||||
Utils.getFileNameWithoutExtension(program) + ".DVMH." +
|
||||
@@ -322,7 +316,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
projectLanguage.getDVMCompile() + "dv " +
|
||||
options + " "
|
||||
+ Utils.DQuotes(program.getName());
|
||||
System.out.println(command);
|
||||
//--
|
||||
File fileWorkspace = program.getParentFile();
|
||||
Process process = Utils.startScript(workspace, fileWorkspace, Utils.getDateName("convert_script"), command);
|
||||
@@ -350,7 +343,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
//--
|
||||
} else
|
||||
throw new RepositoryRefuseException("Внутренняя ошибка. Не удалось распаковать проект");
|
||||
// File archive = Paths.get(workspace.getAbsolutePath());
|
||||
break;
|
||||
}
|
||||
} else
|
||||
@@ -397,7 +389,6 @@ public class ComponentsServer extends RepositoryServer<BugReportsDatabase> {
|
||||
File bugsArchives = Paths.get(todayBackUp.getAbsolutePath(), "Bugs.zip").toFile();
|
||||
//-
|
||||
// Чистка старых бекапов на самом сервере.
|
||||
System.out.println(todayBackUp.getAbsolutePath());
|
||||
Utils.keepNewFiles(todayBackUp.getParentFile(), 2);
|
||||
if (!todayBackUpArchive.exists()) {
|
||||
FileUtils.forceMkdir(todayBackUp);
|
||||
|
||||
Reference in New Issue
Block a user