From b65d47e90626ca5592c76c222cbfe76c23a1b1d6 Mon Sep 17 00:00:00 2001 From: Mathis Chenuet Date: Mon, 5 Jan 2015 23:05:45 +0100 Subject: [PATCH 1/3] typo --- src/com/sheepit/client/os/Linux.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/sheepit/client/os/Linux.java b/src/com/sheepit/client/os/Linux.java index dff2c44..798bb1b 100644 --- a/src/com/sheepit/client/os/Linux.java +++ b/src/com/sheepit/client/os/Linux.java @@ -148,7 +148,7 @@ public class Linux extends OS { actual_command = Utils.concatAll(low, command); } else { - Log.getInstance(null).error("No low priority binary, will not launch renderer in normal prioity"); + Log.getInstance(null).error("No low priority binary, will not launch renderer in normal priority"); } ProcessBuilder builder = new ProcessBuilder(actual_command); @@ -169,7 +169,7 @@ public class Linux extends OS { } catch (IOException e) { this.hasNiceBinary = false; - Log.getInstance(null).error("Failed to find low priority binary, will not launch renderer in normal prioity (" + e + ")"); + Log.getInstance(null).error("Failed to find low priority binary, will not launch renderer in normal priority (" + e + ")"); } finally { if (process != null) { From 28cdb8f822ea24f2b90bb34500e8e18972cec8fc Mon Sep 17 00:00:00 2001 From: Mathis Chenuet Date: Thu, 11 Dec 2014 00:06:55 +0100 Subject: [PATCH 2/3] typo --- README.md | 2 +- src/com/sheepit/client/Server.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 83fd5a8..b432063 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ To create the jar file, simply type "ant". ## Usage Once you have a jar file you look at the usage by doing "java -jar bin/sheepit-client.jar --help". -When you are doing your development you can use a mirror of the main site who is specially made for demo/dev, it is localted at **http://www-demo.sheepit-renderfarm.com** +When you are doing your development you can use a mirror of the main site who is specially made for demo/dev, it is located at **http://www-demo.sheepit-renderfarm.com** diff --git a/src/com/sheepit/client/Server.java b/src/com/sheepit/client/Server.java index 97d1510..482f057 100644 --- a/src/com/sheepit/client/Server.java +++ b/src/com/sheepit/client/Server.java @@ -86,7 +86,7 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager private HashMap pages; private Log log; private long lastRequestTime; - private int keepmealive_duration; // time is ms + private int keepmealive_duration; // time in ms public Server(String url_, Configuration user_config_, Client client_) { super(); From c81f0b167fed28b5fa877f2f684625cacef666cd Mon Sep 17 00:00:00 2001 From: Mathis Chenuet Date: Mon, 5 Jan 2015 23:04:38 +0100 Subject: [PATCH 3/3] variable renames --- src/com/sheepit/client/Client.java | 34 ++++++++++------------- src/com/sheepit/client/Configuration.java | 2 +- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/com/sheepit/client/Client.java b/src/com/sheepit/client/Client.java index 6d6b09b..32d56a9 100644 --- a/src/com/sheepit/client/Client.java +++ b/src/com/sheepit/client/Client.java @@ -98,7 +98,7 @@ public class Client { return -3; } - if (this.config.checkCPUisSUpported() == false) { + if (this.config.checkCPUisSupported() == false) { this.gui.error(Error.humanString(Error.Type.CPU_NOT_SUPPORTED)); return -4; } @@ -634,18 +634,18 @@ public class Client { ajob.setProcess(null); // find the picture file - final String namefile_without_extension = ajob.getPrefixOutputImage() + ajob.getFrameNumber(); + final String filename_without_extension = ajob.getPrefixOutputImage() + ajob.getFrameNumber(); FilenameFilter textFilter = new FilenameFilter() { public boolean accept(File dir, String name) { - return name.startsWith(namefile_without_extension); + return name.startsWith(filename_without_extension); } }; File[] files = this.config.workingDirectory.listFiles(textFilter); if (files.length == 0) { - this.log.error("Client::runRenderer no picture file found (after render finished (namefile_without_extension " + namefile_without_extension + ")"); + this.log.error("Client::runRenderer no picture file found (after finished render (filename_without_extension " + filename_without_extension + ")"); if (ajob.getAskForRendererKill()) { this.log.debug("Client::runRenderer renderer didn't generate any frame but died due to a kill request"); @@ -692,26 +692,23 @@ public class Client { protected int downloadSceneFile(Job ajob_) { this.gui.status("Downloading scene"); - String achive_local_path = ajob_.getSceneArchivePath(); + String archive_local_path = ajob_.getSceneArchivePath(); - File renderer_achive_local_path_file = new File(achive_local_path); + File renderer_archive_local_path_file = new File(archive_local_path); - if (renderer_achive_local_path_file.exists()) { - // the archive have already been downloaded - } - else { + if (renderer_archive_local_path_file.exists() == false) { // we must download the archive int ret; String real_url; real_url = String.format("%s?type=job&job=%s&revision=%s", this.server.getPage("download-archive"), ajob_.getId(), ajob_.getRevision()); - ret = this.server.HTTPGetFile(real_url, achive_local_path, this.gui, "Downloading scene %s %%"); + ret = this.server.HTTPGetFile(real_url, archive_local_path, this.gui, "Downloading scene %s %%"); if (ret != 0) { this.gui.error("Client::downloadSceneFile problem with Utils.DownloadFile returned " + ret); return -1; } String md5_local; - md5_local = Utils.md5(achive_local_path); + md5_local = Utils.md5(archive_local_path); if (md5_local.equals(ajob_.getSceneMD5()) == false) { System.err.println("md5 of the downloaded file and the local file are not the same (local '" + md5_local + "' scene: '" + ajob_.getSceneMD5() + "')"); @@ -729,16 +726,13 @@ public class Client { real_url = String.format("%s?type=binary&job=%s", this.server.getPage("download-archive"), ajob.getId()); // we have the MD5 of the renderer archive - String renderer_achive_local_path = ajob.getRendererArchivePath(); - File renderer_achive_local_path_file = new File(renderer_achive_local_path); + String renderer_archive_local_path = ajob.getRendererArchivePath(); + File renderer_archive_local_path_file = new File(renderer_archive_local_path); - if (renderer_achive_local_path_file.exists()) { - // the archive has been already downloaded - } - else { + if (renderer_archive_local_path_file.exists() == false) { // we must download the archive int ret; - ret = this.server.HTTPGetFile(real_url, renderer_achive_local_path, this.gui, "Downloading renderer %s %%"); + ret = this.server.HTTPGetFile(real_url, renderer_archive_local_path, this.gui, "Downloading renderer %s %%"); if (ret != 0) { this.gui.error("Client::downloadExecutable problem with Utils.DownloadFile returned " + ret); return -9; @@ -746,7 +740,7 @@ public class Client { } String md5_local; - md5_local = Utils.md5(renderer_achive_local_path); + md5_local = Utils.md5(renderer_archive_local_path); if (md5_local.equals(ajob.getRenderMd5()) == false) { this.log.error("Client::downloadExecutable mismatch on md5 local: '" + md5_local + "' server: '" + ajob.getRenderMd5() + "'"); diff --git a/src/com/sheepit/client/Configuration.java b/src/com/sheepit/client/Configuration.java index 538bc9d..765892c 100644 --- a/src/com/sheepit/client/Configuration.java +++ b/src/com/sheepit/client/Configuration.java @@ -284,7 +284,7 @@ public class Configuration { return OS.getOS() != null; } - public boolean checkCPUisSUpported() { + public boolean checkCPUisSupported() { OS os = OS.getOS(); if (os != null) { CPU cpu = os.getCPU();