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

@@ -1,3 +1,6 @@
from pubsub import pub
from zeroconf import ServiceStateChange
from src.api.server_proxy import RenderServerProxy
@@ -5,6 +8,21 @@ class ServerProxyManager:
server_proxys = {}
@classmethod
def subscribe_to_listener(cls):
"""
Subscribes the private class method '__local_job_status_changed' to the 'status_change' pubsub message.
This should be called once, typically during the initialization phase.
"""
pub.subscribe(cls.__zeroconf_state_change, 'zeroconf_state_change')
@classmethod
def __zeroconf_state_change(cls, hostname, state_change, info):
if state_change == ServiceStateChange.Added or state_change == ServiceStateChange.Updated:
cls.get_proxy_for_hostname(hostname)
else:
cls.server_proxys.pop(hostname)
@classmethod
def get_proxy_for_hostname(cls, hostname):
found_proxy = cls.server_proxys.get(hostname)
@@ -14,3 +32,4 @@ class ServerProxyManager:
cls.server_proxys[hostname] = new_proxy
found_proxy = new_proxy
return found_proxy