mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 08:48:13 +00:00
Add UI notifications to a try block
This commit is contained in:
@@ -59,27 +59,30 @@ class DistributedJobManager:
|
|||||||
RenderServerProxy(hostname).cancel_job(child_id, confirm=True)
|
RenderServerProxy(hostname).cancel_job(child_id, confirm=True)
|
||||||
|
|
||||||
# UI Notifications
|
# UI Notifications
|
||||||
if new_status == RenderStatus.COMPLETED:
|
try:
|
||||||
logger.debug("show render complete notification")
|
if new_status == RenderStatus.COMPLETED:
|
||||||
notification.notify(
|
logger.debug("show render complete notification")
|
||||||
title='Render Job Complete',
|
notification.notify(
|
||||||
message=f'{render_job.name} completed succesfully',
|
title='Render Job Complete',
|
||||||
timeout=10 # Display time in seconds
|
message=f'{render_job.name} completed succesfully',
|
||||||
)
|
timeout=10 # Display time in seconds
|
||||||
elif new_status == RenderStatus.ERROR:
|
)
|
||||||
logger.debug("show render complete notification")
|
elif new_status == RenderStatus.ERROR:
|
||||||
notification.notify(
|
logger.debug("show render complete notification")
|
||||||
title='Render Job Failed',
|
notification.notify(
|
||||||
message=f'{render_job.name} failed rendering',
|
title='Render Job Failed',
|
||||||
timeout=10 # Display time in seconds
|
message=f'{render_job.name} failed rendering',
|
||||||
)
|
timeout=10 # Display time in seconds
|
||||||
elif new_status == RenderStatus.RUNNING:
|
)
|
||||||
logger.debug("show render complete notification")
|
elif new_status == RenderStatus.RUNNING:
|
||||||
notification.notify(
|
logger.debug("show render complete notification")
|
||||||
title='Render Job Started',
|
notification.notify(
|
||||||
message=f'{render_job.name} started rendering',
|
title='Render Job Started',
|
||||||
timeout=10 # Display time in seconds
|
message=f'{render_job.name} started rendering',
|
||||||
)
|
timeout=10 # Display time in seconds
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
logger.debug(f"Unable to show UI notification: {e}")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def handle_subjob_status_change(cls, local_job, subjob_data):
|
def handle_subjob_status_change(cls, local_job, subjob_data):
|
||||||
|
|||||||
Reference in New Issue
Block a user