Fix #47 User can block a project on his client

This commit is contained in:
Laurent Clouet
2015-10-27 21:00:44 +00:00
parent 8b25a08f6a
commit 4873b8272b
4 changed files with 36 additions and 1 deletions

View File

@@ -60,6 +60,7 @@ public class Job {
private boolean synchronousUpload;
private RenderProcess render;
private boolean askForRendererKill;
private boolean userBlockJob;
private Gui gui;
private Configuration config;
private Log log;
@@ -81,6 +82,7 @@ public class Job {
script = script_;
updateRenderingStatusMethod = update_method_;
askForRendererKill = false;
userBlockJob = false;
log = log_;
render = new RenderProcess();
}
@@ -133,6 +135,14 @@ public class Job {
return askForRendererKill;
}
public void setUserBlockJob(boolean val) {
userBlockJob = val;
}
public boolean getUserBlockJob() {
return userBlockJob;
}
public String getRenderCommand() {
return rendererCommand;
}
@@ -328,6 +338,9 @@ public class Job {
if (getAskForRendererKill()) {
log.debug("Client::runRenderer renderer didn't generate any frame but died due to a kill request");
if (getUserBlockJob()) {
return Error.Type.RENDERER_KILLED_BY_USER;
}
return Error.Type.RENDERER_KILLED;
}