Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.File;
import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
Expand Down Expand Up @@ -303,6 +302,11 @@ private TaskResponse pushTaskQueue(TaskRequest request) throws ExecutionExceptio
return this.runTask(request);
});
this.taskQueue.put(ft);

if (!this.readyCoreContainer.isEmpty() || !this.readyTempContainer.isEmpty()) {
this.popTaskQueue();
}

return ft.get();
}

Expand Down Expand Up @@ -406,28 +410,6 @@ public FileVisitResult postVisitDirectory(@NotNull Path dir, @Nullable IOExcepti
}
}

/**
* Create writable temporary file
* @param tempDir temporary directory
* @param fileName file name
* @throws IOException IO exception
*/
protected void createWritableFile(Path tempDir, String fileName) throws IOException {
File file = new File(tempDir.resolve(fileName).toUri());
if (file.exists()) {
if (!file.setWritable(true, false)) {
throw new IOException("Cannot write to existing file: " + file.getAbsolutePath());
}
return;
}
if (!file.createNewFile()) {
throw new IOException("Failed to create file: " + file.getAbsolutePath());
}
if (!file.setWritable(true, false)) {
throw new IOException("Cannot write to existing file: " + file.getAbsolutePath());
}
}

/**
* Generate unique container name
*/
Expand Down
Loading