Introduce FSHealthCheck to run after a possibly-filesystem related error.
This commit is contained in:
committed by
Sheepit Renderfarm
parent
68ad00334e
commit
9eed45ef6e
@@ -247,6 +247,9 @@ import java.util.regex.Pattern;
|
||||
catch (IOException e) {
|
||||
StringWriter sw = new StringWriter();
|
||||
e.printStackTrace(new PrintWriter(sw));
|
||||
for (String logline : configuration.filesystemHealthCheck()) {
|
||||
log.debug(logline);
|
||||
}
|
||||
log.error("Job::render exception on script generation, will return UNKNOWN " + e + " stacktrace " + sw.toString());
|
||||
return Error.Type.UNKNOWN;
|
||||
}
|
||||
@@ -409,6 +412,9 @@ import java.util.regex.Pattern;
|
||||
|
||||
// Put back base icon
|
||||
gui.updateTrayIcon(Job.SHOW_BASE_ICON);
|
||||
for (String logline : configuration.filesystemHealthCheck()) {
|
||||
log.debug(logline);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -458,6 +464,9 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
StringWriter sw = new StringWriter();
|
||||
err.printStackTrace(new PrintWriter(sw));
|
||||
for (String logline : configuration.filesystemHealthCheck()) {
|
||||
log.debug(logline);
|
||||
}
|
||||
log.error("Job::render exception(A) " + err + " stacktrace " + sw.toString());
|
||||
return Error.Type.FAILED_TO_EXECUTE;
|
||||
}
|
||||
@@ -505,6 +514,9 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
|
||||
if (files.length == 0) {
|
||||
for (String logline : configuration.filesystemHealthCheck()) {
|
||||
log.debug(logline);
|
||||
}
|
||||
log.error("Job::render no picture file found (after finished render (filename_without_extension " + filename_without_extension + ")");
|
||||
|
||||
String basename = "";
|
||||
@@ -516,12 +528,18 @@ import java.util.regex.Pattern;
|
||||
}
|
||||
File crash_file = new File(configuration.getWorkingDirectory() + File.separator + basename + ".crash.txt");
|
||||
if (crash_file.exists()) {
|
||||
for (String logline : configuration.filesystemHealthCheck()) {
|
||||
log.debug(logline);
|
||||
}
|
||||
log.error("Job::render crash file found => the renderer crashed");
|
||||
crash_file.delete();
|
||||
return Error.Type.RENDERER_CRASHED;
|
||||
}
|
||||
|
||||
if (exit_value == 127 && process.getDuration() < 10) {
|
||||
for (String logline : configuration.filesystemHealthCheck()) {
|
||||
log.debug(logline);
|
||||
}
|
||||
log.error("Job::render renderer returned 127 and took " + process.getDuration() + "s, some libraries may be missing");
|
||||
return Error.Type.RENDERER_MISSING_LIBRARIES;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user