рабочий вариант отдельных процессов на разные машины

This commit is contained in:
2024-04-23 22:48:02 +03:00
parent f2d0eb0d2c
commit 4d543cb94f
11 changed files with 80 additions and 78 deletions

View File

@@ -70,14 +70,18 @@ public abstract class RepositoryServer<D extends Database> {
System.exit(0);
return null;
});
protected static void Print(String message) throws IOException {
protected static void Print(String message) {
if (printOn) {
Log = new FileWriter("Log.txt", true);
String dmessage = Utils.Brackets("SESSION -> ") + new Date() +
" " + message;
System.out.println(dmessage);
Log.write(dmessage + "\n");
Log.close();
try {
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) {
ex.printStackTrace();
}
}
}
protected void checkTargets(EmailMessage message_in) {
@@ -366,7 +370,7 @@ public abstract class RepositoryServer<D extends Database> {
}
public void afterDeleteAction(DBObject object) throws Exception {
}
public void Ping(){
public void Ping() {
response = new ServerExchangeUnit_2021(ServerCode.OK);
}
}