уничтожение процесса тестирования.
This commit is contained in:
@@ -6,7 +6,6 @@ import java.io.File;
|
||||
import java.util.concurrent.Callable;
|
||||
public class InterruptThread extends Thread{
|
||||
//------------
|
||||
public static final String Eliminated = "Eliminated";
|
||||
public InterruptThread(int sleep_ms, Callable action){
|
||||
super(() -> {
|
||||
File interruptFile = new File(db_project_info.interrupt);
|
||||
@@ -14,7 +13,7 @@ public class InterruptThread extends Thread{
|
||||
while (true) {
|
||||
Thread.sleep(sleep_ms);
|
||||
if (interruptFile.exists()) {
|
||||
FileUtils.writeStringToFile(new File(Eliminated + " by INTERRUPT file"), "");
|
||||
FileUtils.writeStringToFile(new File("ABORTED"), "");
|
||||
FileUtils.forceDelete(interruptFile);
|
||||
action.call();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user