mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Wait for subjob completion and download render files to host (#17)
* Fix Blender image sequence -> video conversion and change video to use ProRes * Wait for child jobs to complete * Download and extract render files from subjobs * Fix issue where zip was not removed * Update client to use new method names in server proxy * Fix minor download issue
This commit is contained in:
@@ -193,8 +193,7 @@ def make_job_ready(job_id):
|
||||
found_job = RenderQueue.job_with_id(job_id)
|
||||
if found_job.status in [RenderStatus.NOT_READY, RenderStatus.NOT_STARTED]:
|
||||
if found_job.children:
|
||||
for child_name in found_job.children.split(','):
|
||||
child_id, hostname = child_name.split('@')
|
||||
for hostname, child_id in found_job.children.items():
|
||||
RenderServerProxy(hostname).request_data(f'/api/job/<child_id>/make_ready')
|
||||
found_job.status = RenderStatus.NOT_STARTED
|
||||
RenderQueue.save_state()
|
||||
@@ -323,7 +322,7 @@ def add_job_handler():
|
||||
logger.info(f"Attempting to download URL: {project_url}")
|
||||
try:
|
||||
downloaded_file_url, info = urlretrieve(project_url)
|
||||
referred_name = info.get_filename()
|
||||
referred_name = info.get_filename() or os.path.basename(project_url)
|
||||
except Exception as e:
|
||||
err_msg = f"Error downloading file: {e}"
|
||||
logger.error(err_msg)
|
||||
@@ -507,7 +506,8 @@ def create_subjobs(worker, job_data, project_path):
|
||||
|
||||
# start subjobs
|
||||
logger.debug(f"Starting {len(server_frame_ranges) - 1} attempted subjobs")
|
||||
worker.children = ",".join([f"{results['id']}@{hostname}" for hostname, results in submission_results.items()])
|
||||
for hostname, results in submission_results.items():
|
||||
worker.children[hostname] = results['id']
|
||||
worker.name = f"{worker.name}[{worker.start_frame}-{worker.end_frame}]"
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user