mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Fix issue with client not showing up when no jobs available
This commit is contained in:
@@ -24,13 +24,16 @@ class RenderServerProxy:
|
||||
|
||||
def request_data(self, payload, timeout=5):
|
||||
try:
|
||||
req = requests.get(f'http://{self.hostname}:{self.port}/api/{payload}', timeout=timeout)
|
||||
req = self.request(payload, timeout)
|
||||
if req.ok:
|
||||
return req.json()
|
||||
except Exception as e:
|
||||
pass
|
||||
return None
|
||||
|
||||
def request(self, payload, timeout=5):
|
||||
return requests.get(f'http://{self.hostname}:{self.port}/api/{payload}', timeout=timeout)
|
||||
|
||||
def get_jobs(self):
|
||||
all_jobs = self.request_data('jobs')
|
||||
sorted_jobs = []
|
||||
|
||||
Reference in New Issue
Block a user