Merge branch 'feat/denoising-type' into 'master'

Feat: handle disable of session on denoising

See merge request sheepitrenderfarm/client!148
This commit is contained in:
harlekin
2022-07-29 17:13:30 +00:00
4 changed files with 47 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ import com.sheepit.client.exception.FermeExceptionNoWritePermission;
import com.sheepit.client.exception.FermeExceptionServerInMaintenance;
import com.sheepit.client.exception.FermeExceptionServerOverloaded;
import com.sheepit.client.exception.FermeExceptionSessionDisabled;
import com.sheepit.client.exception.FermeExceptionSessionDisabledDenoisingNotSupported;
import com.sheepit.client.exception.FermeServerDown;
import com.sheepit.client.hardware.cpu.CPU;
import com.sheepit.client.os.OS;
@@ -232,6 +233,17 @@ import okhttp3.HttpUrl;
}
}
}
catch (FermeExceptionSessionDisabledDenoisingNotSupported e) {
this.gui.error(Error.humanString(Error.Type.DENOISING_NOT_SUPPORTED));
// should wait forever to actually display the message to the user
while (shuttingdown == false) {
try {
Thread.sleep(1000);
}
catch (InterruptedException e1) {
}
}
}
catch (FermeExceptionNoRendererAvailable e) {
this.gui.error(Error.humanString(Error.Type.RENDERER_NOT_AVAILABLE));
// should wait forever to actually display the message to the user

View File

@@ -89,6 +89,7 @@ public class Error {
JOB_REQUEST_ERROR_NO_RENDERING_RIGHT(201),
JOB_REQUEST_ERROR_DEAD_SESSION(202),
JOB_REQUEST_ERROR_SESSION_DISABLED(203),
JOB_REQUEST_ERROR_SESSION_DISABLED_DENOISING_NOT_SUPPORTED(208),
JOB_REQUEST_ERROR_INTERNAL_ERROR(204),
JOB_REQUEST_ERROR_RENDERER_NOT_AVAILABLE(205),
JOB_REQUEST_SERVER_IN_MAINTENANCE(206),
@@ -207,7 +208,7 @@ public class Error {
case CPU_NOT_SUPPORTED:
return "This CPU is not supported.";
case DENOISING_NOT_SUPPORTED:
return "Denoising is not supported on this device.";
return "Denoising is not supported on this device. Session can not continue. Please use CPU or Virtual Machine with SSE4.1 instruction set.";
case ENGINE_NOT_AVAILABLE:
return "The project requires a rendering engine that isn't supported on this machine. Will try another project in a few minutes.";
case NO_SPACE_LEFT_ON_DEVICE:

View File

@@ -41,6 +41,7 @@ import java.util.stream.Collectors;
import com.sheepit.client.datamodel.SpeedTestTarget;
import com.sheepit.client.datamodel.SpeedTestResult;
import com.sheepit.client.datamodel.SpeedTestTargetResult;
import com.sheepit.client.exception.FermeExceptionSessionDisabledDenoisingNotSupported;
import com.sheepit.client.hardware.hwid.HWIdentifier;
import com.sheepit.client.os.Windows;
import lombok.Getter;
@@ -379,6 +380,8 @@ public class Server extends Thread {
throw new FermeExceptionNoSession();
case JOB_REQUEST_ERROR_SESSION_DISABLED:
throw new FermeExceptionSessionDisabled();
case JOB_REQUEST_ERROR_SESSION_DISABLED_DENOISING_NOT_SUPPORTED:
throw new FermeExceptionSessionDisabledDenoisingNotSupported();
case JOB_REQUEST_ERROR_INTERNAL_ERROR:
throw new FermeExceptionBadResponseFromServer();
case JOB_REQUEST_ERROR_RENDERER_NOT_AVAILABLE:

View File

@@ -0,0 +1,30 @@
/*
* Copyright (C) 2022 Laurent CLOUET
* Author Laurent CLOUET <laurent.clouet@nopnop.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.sheepit.client.exception;
public class FermeExceptionSessionDisabledDenoisingNotSupported extends FermeException {
public FermeExceptionSessionDisabledDenoisingNotSupported() {
super();
}
public FermeExceptionSessionDisabledDenoisingNotSupported(String message_) {
super(message_);
}
}