예제 #1
0
 def createRenderingJob(self, rendering):
     self.on_render_start = Mock(return_value=None)
     self.on_render_success = Mock(return_value=None)
     self.on_render_error = Mock(return_value=None)
     return TimelapseRenderJob(
         job_id=self.rendering_job_id,
         rendering=rendering,
         debug=self.octolapse_settings.current_debug_profile(),
         print_filename=self.print_name,
         capture_dir=self.snapshot_dir_path,
         snapshot_filename_format=self.capture_template,
         output_tokens=Render._get_output_tokens(self.data_directory,
                                                 "COMPLETED",
                                                 self.print_name,
                                                 self.print_start_time,
                                                 self.print_end_time),
         octoprint_timelapse_folder=self.octoprint_timelapse_folder,
         ffmpeg_path=self.ffmpeg_path,
         threads=1,
         time_added=0,
         on_render_start=self.on_render_start,
         on_success=self.on_render_success,
         on_error=self.on_render_error,
         clean_after_success=True,
         clean_after_fail=True)
예제 #2
0
 def createRenderingJob(self, rendering):
     return TimelapseRenderJob(
         job_id=self.rendering_job_id,
         rendering=rendering,
         debug=self.octolapse_settings.current_debug_profile(),
         print_filename=self.print_name,
         capture_dir=self.snapshot_dir_path,
         capture_template=self.capture_template,
         output_tokens=Render._get_output_tokens(self.data_directory,
                                                 "COMPLETED",
                                                 self.print_name,
                                                 self.print_start_time,
                                                 self.print_end_time),
         octoprint_timelapse_folder=self.octoprint_timelapse_folder,
         ffmpeg_path=self.ffmpeg_path,
         threads=1,
         rendering_task_queue=self.render_task_queue,
         time_added=0,
         on_render_start=lambda job_id, payload: None,
         on_complete=lambda job_id, payload: None,
         clean_after_success=True,
         clean_after_fail=True)