Add job polish (#63)

* Remove legacy client

* Misc cleanup

* Add message box after submission success / fail

* Use a new is_localhost method to handle localhost not including '.local'

* Code cleanup

* Fix issue where engine browser would think we're downloading forever

* Add message box after submission success / fail

* Use a new is_localhost method to handle localhost not including '.local'

* Code cleanup

* Fix issue where engine browser would think we're downloading forever

* Add pubsub messages to serverproxy_manager.py

* Add resolution, fps and renderer versions to add_job.py

* Add cameras to add_job.py

* Add message box after submission success / fail

* Use a new is_localhost method to handle localhost not including '.local'

* Code cleanup

* Fix issue where engine browser would think we're downloading forever

* Add message box after submission success / fail

* Code cleanup

* Add cameras to add_job.py

* Add dynamic engine options and output format

* Move UI work out of BG threads and add engine presubmission tasks

* Submit dynamic args when creating a new job

* Hide groups and show messagebox after submission

* Choose file when pressing New Job in main window now
This commit is contained in:
2023-11-11 07:35:56 -06:00
committed by GitHub
parent 0271abf705
commit da61bf72f8
15 changed files with 486 additions and 156 deletions

View File

@@ -8,6 +8,7 @@ import time
import requests
from requests_toolbelt.multipart import MultipartEncoder, MultipartEncoderMonitor
from src.utilities.misc_helper import is_localhost
from src.utilities.status_utils import RenderStatus
status_colors = {RenderStatus.ERROR: "red", RenderStatus.CANCELLED: 'orange1', RenderStatus.COMPLETED: 'green',
@@ -145,7 +146,7 @@ class RenderServerProxy:
def post_job_to_server(self, file_path, job_list, callback=None):
# bypass uploading file if posting to localhost
if self.hostname == socket.gethostname():
if is_localhost(self.hostname):
jobs_with_path = [{**item, "local_path": file_path} for item in job_list]
return requests.post(f'http://{self.hostname}:{self.port}/api/add_job', data=json.dumps(jobs_with_path),
headers={'Content-Type': 'application/json'})
@@ -181,8 +182,8 @@ class RenderServerProxy:
# --- Renderer --- #
def get_renderer_info(self, timeout=5, simple=False):
all_data = self.request_data(f'renderer_info?simple={simple}', timeout=timeout)
def get_renderer_info(self, timeout=5):
all_data = self.request_data(f'renderer_info', timeout=timeout)
return all_data
def delete_engine(self, engine, version, system_cpu=None):