no message

This commit is contained in:
2023-10-04 22:01:09 +03:00
parent 2a0a5f38b1
commit 2f0d01b9f3
51 changed files with 146 additions and 94 deletions

View File

@@ -1,5 +1,5 @@
package Common.Utils;
import ProjectData.Project.db_project_info;
import Common.Constants;
import org.apache.commons.io.FileUtils;
import java.io.File;
@@ -8,14 +8,14 @@ public class InterruptThread extends Thread{
//------------
public InterruptThread(int sleep_ms, Callable action){
super(() -> {
File interruptFile = new File(db_project_info.interrupt);
File interruptFile = new File(Constants.INTERRUPT);
try {
while (true) {
Thread.sleep(sleep_ms);
if (interruptFile.exists()) {
FileUtils.writeStringToFile(new File("ABORTED"), "");
FileUtils.forceDelete(interruptFile);
action.call();
FileUtils.writeStringToFile(new File(Constants.ABORTED), "");
FileUtils.forceDelete(interruptFile);
}
}
} catch (Exception ex) {