From ffb49740af5057733263df2689fd4a73b481066c Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Tue, 13 Jan 2015 21:07:58 +0100 Subject: [PATCH] Improvement: use the update_method provide by the server --- src/com/sheepit/client/Job.java | 4 ++-- src/com/sheepit/client/Server.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/com/sheepit/client/Job.java b/src/com/sheepit/client/Job.java index 5205d8a..e72ef08 100644 --- a/src/com/sheepit/client/Job.java +++ b/src/com/sheepit/client/Job.java @@ -46,7 +46,7 @@ public class Job { private Configuration config; - public Job(Configuration config_, String id_, String frame_, String revision_, String path_, boolean use_gpu, String command_, String script_, String sceneMd5_, String rendererMd5_, String extras_, boolean synchronous_upload_) { + public Job(Configuration config_, String id_, String frame_, String revision_, String path_, boolean use_gpu, String command_, String script_, String sceneMd5_, String rendererMd5_, String extras_, boolean synchronous_upload_, String update_method_) { config = config_; id = id_; numFrame = frame_; @@ -64,7 +64,7 @@ public class Job { memoryUsed = 0; script = script_; maxOutputNbLines = 0; - updateRenderingStatusMethod = null; + updateRenderingStatusMethod = update_method_; process = null; askForRendererKill = false; diff --git a/src/com/sheepit/client/Server.java b/src/com/sheepit/client/Server.java index 97d1510..2070213 100644 --- a/src/com/sheepit/client/Server.java +++ b/src/com/sheepit/client/Server.java @@ -385,6 +385,11 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager frame_extras = job_node.getAttribute("extras"); } + String update_method = null; + if (renderer_node.hasAttribute("update_method")) { + update_method = renderer_node.getAttribute("update_method");; + } + Job a_job = new Job( this.user_config, job_node.getAttribute("id"), @@ -397,7 +402,8 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager job_node.getAttribute("archive_md5"), renderer_node.getAttribute("md5"), frame_extras, - synchronous_upload + synchronous_upload, + update_method ); this.client.getGui().framesRemaining(remaining_frames);