Manually add servers (#9)

* Add ability to manually add servers to client

* Misc client cleanup

* Add availability check before adding server to client UI
This commit is contained in:
2023-06-08 08:19:37 -05:00
committed by GitHub
parent f54d665714
commit 05c8ac506c
3 changed files with 35 additions and 16 deletions

View File

@@ -52,8 +52,8 @@ class RenderServerProxy:
def request(self, payload, timeout=5):
return requests.get(f'http://{self.hostname}:{self.port}/api/{payload}', timeout=timeout)
def get_jobs(self, timeout=5):
url = f'jobs?token={self.__jobs_cache_token}' if self.__jobs_cache_token else 'jobs'
def get_jobs(self, timeout=5, ignore_token=False):
url = f'jobs?token={self.__jobs_cache_token}' if self.__jobs_cache_token and not ignore_token else 'jobs'
status_result = self.request_data(url, timeout=timeout)
all_jobs = None
if status_result is not None: