Kill orphan Blender process after rendering

This commit is contained in:
Raimund58
2023-07-15 14:49:03 +00:00
committed by harlekin
parent 5723d20a6a
commit 99a7020a2f
4 changed files with 21 additions and 7 deletions

View File

@@ -123,7 +123,7 @@ import java.util.regex.Pattern;
setUserBlockJob(true);
RenderProcess process = getProcessRender();
if (process != null) {
OS.getOS().kill(process.getProcess());
process.kill();
}
}
@@ -374,8 +374,8 @@ import java.util.regex.Pattern;
long duration = (new Date().getTime() - process.getStartTime()) / 1000; // in seconds
if (configuration.getMaxRenderTime() > 0 && duration > configuration.getMaxRenderTime()) {
setAskForRendererKill(true);
log.debug("Killing render because process duration");
OS.getOS().kill(process.getProcess());
log.debug("Killing render - exceeding allowed process duration");
process.kill();
}
}
}
@@ -455,7 +455,6 @@ import java.util.regex.Pattern;
if (configuration.getMaxAllowedMemory() != -1 && getProcessRender().getMemoryUsed().get() > configuration.getMaxAllowedMemory()) {
log.debug("Blocking render because process ram used (" + getProcessRender().getMemoryUsed().get() + "k) is over user setting (" + configuration
.getMaxAllowedMemory() + "k)");
OS.getOS().kill(process.getProcess());
process.finish();
if (process.getRenderDuration() == -1) {
if (timeStamp == null) {
@@ -498,6 +497,7 @@ import java.util.regex.Pattern;
// Put back base icon
gui.updateTrayIcon(Job.SHOW_BASE_ICON);
process.kill();
for (String logline : configuration.filesystemHealthCheck()) {
log.debug(logline);
}
@@ -547,8 +547,9 @@ import java.util.regex.Pattern;
// Put back base icon
gui.updateTrayIcon(Job.SHOW_BASE_ICON);
log.debug("end of rendering");
}
catch (Exception err) {
if (script_file != null) {