Fix #47 User can block a project on his client
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user