Remove blend files after the render has started
This commit is contained in:
@@ -628,6 +628,8 @@ public class Client {
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
removeSceneDirectory(ajob);
|
||||||
|
|
||||||
return Error.Type.OK;
|
return Error.Type.OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,6 +702,10 @@ public class Client {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void removeSceneDirectory(Job ajob) {
|
||||||
|
Utils.delete(new File(ajob.getSceneDirectory()));
|
||||||
|
}
|
||||||
|
|
||||||
protected int prepareWorkingDirectory(Job ajob) throws FermeExceptionNoSpaceLeftOnDevice {
|
protected int prepareWorkingDirectory(Job ajob) throws FermeExceptionNoSpaceLeftOnDevice {
|
||||||
int ret;
|
int ret;
|
||||||
String renderer_archive = ajob.getRendererArchivePath();
|
String renderer_archive = ajob.getRendererArchivePath();
|
||||||
|
|||||||
@@ -70,10 +70,14 @@ public class Job {
|
|||||||
private boolean serverBlockJob;
|
private boolean serverBlockJob;
|
||||||
private Gui gui;
|
private Gui gui;
|
||||||
private Configuration config;
|
private Configuration config;
|
||||||
|
private Client client;
|
||||||
private Log log;
|
private Log log;
|
||||||
|
|
||||||
public Job(Configuration config_, Gui gui_, Log log_, String id_, String frame_, String path_, boolean use_gpu, String command_, String script_, String sceneMd5_, String rendererMd5_, String name_, String password_, String extras_, boolean synchronous_upload_, String update_method_) {
|
private boolean directoryRemoved;
|
||||||
|
|
||||||
|
public Job(Configuration config_, Client client_, Gui gui_, Log log_, String id_, String frame_, String path_, boolean use_gpu, String command_, String script_, String sceneMd5_, String rendererMd5_, String name_, String password_, String extras_, boolean synchronous_upload_, String update_method_) {
|
||||||
config = config_;
|
config = config_;
|
||||||
|
client = client_;
|
||||||
id = id_;
|
id = id_;
|
||||||
numFrame = frame_;
|
numFrame = frame_;
|
||||||
path = path_;
|
path = path_;
|
||||||
@@ -94,6 +98,7 @@ public class Job {
|
|||||||
serverBlockJob = false;
|
serverBlockJob = false;
|
||||||
log = log_;
|
log = log_;
|
||||||
render = new RenderProcess();
|
render = new RenderProcess();
|
||||||
|
directoryRemoved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void block() {
|
public void block() {
|
||||||
@@ -371,6 +376,11 @@ public class Job {
|
|||||||
}
|
}
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (directoryRemoved == false && (process.getMemoryUsed() > 0 || process.getRemainingDuration() > 0)) {
|
||||||
|
client.removeSceneDirectory(this);
|
||||||
|
directoryRemoved = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
input.close();
|
input.close();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -464,6 +464,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
|||||||
|
|
||||||
Job a_job = new Job(
|
Job a_job = new Job(
|
||||||
this.user_config,
|
this.user_config,
|
||||||
|
this.client,
|
||||||
this.client.getGui(),
|
this.client.getGui(),
|
||||||
this.client.getLog(),
|
this.client.getLog(),
|
||||||
job_node.getAttribute("id"),
|
job_node.getAttribute("id"),
|
||||||
|
|||||||
Reference in New Issue
Block a user