mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-19 01:38:12 +00:00
Add docstrings to base_engine.py and base_worker.py
This commit is contained in:
@@ -130,10 +130,8 @@ class DistributedJobManager:
|
||||
|
||||
@classmethod
|
||||
def create_render_job(cls, job_data, loaded_project_local_path):
|
||||
"""
|
||||
Creates render jobs.
|
||||
|
||||
This method job data and a local path to a loaded project. It creates and returns new a render job.
|
||||
"""Creates render jobs. Pass in dict of job_data and the local path to the project. It creates and returns a new
|
||||
render job.
|
||||
|
||||
Args:
|
||||
job_data (dict): Job data.
|
||||
@@ -189,8 +187,7 @@ class DistributedJobManager:
|
||||
|
||||
@classmethod
|
||||
def handle_subjob_update_notification(cls, local_job, subjob_data):
|
||||
"""
|
||||
Responds to a notification from a remote subjob and the host requests any subsequent updates from the subjob.
|
||||
"""Responds to a notification from a remote subjob and the host requests any subsequent updates from the subjob.
|
||||
|
||||
Args:
|
||||
local_job (BaseRenderWorker): The local parent job worker.
|
||||
@@ -214,6 +211,14 @@ class DistributedJobManager:
|
||||
|
||||
@classmethod
|
||||
def wait_for_subjobs(cls, parent_job):
|
||||
"""Check the status of subjobs and waits until they are all finished. Download rendered frames from subjobs
|
||||
when they are completed.
|
||||
|
||||
Args:
|
||||
parent_job: Worker object that has child jobs
|
||||
|
||||
Returns:
|
||||
"""
|
||||
logger.debug(f"Waiting for subjobs for job {parent_job}")
|
||||
parent_job.status = RenderStatus.WAITING_FOR_SUBJOBS
|
||||
statuses_to_download = [RenderStatus.CANCELLED, RenderStatus.ERROR, RenderStatus.COMPLETED]
|
||||
|
||||
Reference in New Issue
Block a user