mirror of
https://github.com/blw1138/Zordon.git
synced 2026-02-05 13:46:10 +00:00
Download frames from subjobs as frames are completed (#87)
* Add a frame complete notification to BaseWorker and distributed_job_manager.py * Add API to download individual files to API server and ServerProxy * Rename subjob notification API and add download_missing_frames_from_subjob * Subjobs will now notify parent when a frame is complete * Fix missed rename * Add some misc logging * Better error handling * Fix frame download file path issue * Download missing frames at job completion and misc cleanup * Misc cleanup * Code cleanup
This commit is contained in:
@@ -110,6 +110,7 @@ class BlenderRenderWorker(BaseRenderWorker):
|
||||
output_file_number = output_filename_match.groups()[0]
|
||||
try:
|
||||
self.current_frame = int(output_file_number)
|
||||
self._send_frame_complete_notification()
|
||||
except ValueError:
|
||||
pass
|
||||
elif render_stats_match:
|
||||
@@ -118,15 +119,15 @@ class BlenderRenderWorker(BaseRenderWorker):
|
||||
logger.info(f'Frame #{self.current_frame} - '
|
||||
f'{frame_count} of {self.total_frames} completed in {time_completed} | '
|
||||
f'Total Elapsed Time: {datetime.now() - self.start_time}')
|
||||
else:
|
||||
logger.debug(f'DEBUG: {line}')
|
||||
else:
|
||||
pass
|
||||
# if len(line.strip()):
|
||||
# logger.debug(line.strip())
|
||||
|
||||
def percent_complete(self):
|
||||
if self.total_frames <= 1:
|
||||
if self.status == RenderStatus.COMPLETED:
|
||||
return 1
|
||||
elif self.total_frames <= 1:
|
||||
return self.__frame_percent_complete
|
||||
else:
|
||||
whole_frame_percent = (self.current_frame - self.start_frame) / self.total_frames
|
||||
|
||||
Reference in New Issue
Block a user