Feat: send runing/paused status

This commit is contained in:
Sheepit Renderfarm
2022-10-19 16:45:31 +00:00
committed by harlekin
parent 6fd91f1d8d
commit 7a6167ed4d
2 changed files with 2 additions and 0 deletions

View File

@@ -195,6 +195,7 @@ Parameter as GET or POST:
* frame: Frame number of the rendering job
* rendertime: current render time (optional)
* remainingtime: current remaining time to render the frame (optional)
* paused: whether the client is actively paused or not
Answer:
<?xml version="1.0" encoding="utf-8" ?>

View File

@@ -126,6 +126,7 @@ public class Server extends Thread {
if ((current_time - this.lastRequestTime) > this.keepmealive_duration) {
try {
HttpUrl.Builder urlBuilder = Objects.requireNonNull(HttpUrl.parse(this.getPage("keepmealive"))).newBuilder();
urlBuilder.addQueryParameter("paused", String.valueOf(this.client.isSuspended()));
if (this.client != null && this.client.getRenderingJob() != null) {
Job job = this.client.getRenderingJob();