def submit_job(self): try: spec = JobSpec(**self.job_data) # TODO: find a better place to do this. if not str(self.scene_field.text()): raise RuntimeError("Scene cannot be blank.") if self.render_field.currentText() == 'SELECT': raise RuntimeError("Renderer cannot be blank.") if not self.title_field.text(): raise RuntimeError("Title cannot be blank.") # Key env vars that influence submission os.environ['HEAD_NODE'] = str(self.head_node_field.currentText()) if self.rrt_debug.isChecked(): os.environ['RRT_DEBUG'] = '1' else: os.environ['RRT_DEBUG'] = '0' spec.submit_job(pause=True if ((os.getenv('RRT_DEBUG', False) == '1') or self.pause.isChecked()) else False) #self.quit() except Exception, e: alert = QtGui.QMessageBox(self) alert.setWindowTitle('Error') alert.setIcon(QtGui.QMessageBox.Warning) alert.setText(str(e)) alert.exec_()
def submit_job(self, *args, **kwargs): if self._is_valid(): spec = JobSpec(**self.job_data) LOG.debug(spec.ini_data) try: spec.submit_job() except Exception, e: LOG.error(e)
def submit_job(self, *args, **kwargs): if self._is_valid(): spec = JobSpec(**self.job_data) LOG.debug(spec.ini_data) try: os.environ['HEAD_NODE'] = self._controls['head_node'].getValue() os.environ['RRT_DEBUG'] = '1' if self._controls['debug'].getValue() else '' spec.submit_job(pause=self._controls['pause'].getValue()) except Exception, e: LOG.error(e)
def submit_job(self): try: spec = JobSpec(**self.job_data) # TODO: find a better place to do this. if not str(self.output_base_field.text()): raise RuntimeError("Output cannot be blank.") spec.submit_job() self.quit() except Exception, e: alert = QtGui.QMessageBox(self) alert.setWindowTitle('Error') alert.setIcon(QtGui.QMessageBox.Warning) alert.setText(str(e)) alert.exec_()
def submit_job(self): try: spec = JobSpec(**self.job_data) # TODO: find a better place to do this. if not str(self.output_base_field.text()): raise RuntimeError("Output cannot be blank.") # Key env vars that influence submission os.environ['HEAD_NODE'] = str(self.head_node_field.currentText()) spec.submit_job(pause=True if os.getenv('RRT_DEBUG', False) else False) self.quit() except Exception, e: alert = QtGui.QMessageBox(self) alert.setWindowTitle('Error') alert.setIcon(QtGui.QMessageBox.Warning) alert.setText(str(e)) alert.exec_()
def job_data(self): job_uuid = JobSpec.new_uuid() return { 'renderer': get_job_type(), 'title': self.job_title, 'project': os.path.normpath(workspace.getPath()), 'output': os.path.join(JOB_OUTPUT_UNC, getpass.getuser(), job_uuid), 'scene': os.path.normpath(sceneName()), 'start': self.job_start, 'end': self.job_end, 'threads': self.job_threads, 'step': int(Scene().defaultRenderGlobals.byFrameStep.get()), 'uuid': job_uuid, }
def job_data(self): job_uuid = JobSpec.new_uuid() start_frame = min((int(self.start_field.value()), int(self.end_field.value()))) end_frame = max((int(self.start_field.value()), int(self.end_field.value()))) image_filename = str(self.output_base_field.text()) + str(self.output_ext_field.currentText()) return { 'renderer' : 'max', 'title' : str(self.title_field.text()), 'uuid' : job_uuid, 'project' : os.path.normpath(str(self.project_field.text())), 'scene' : str(self.scene_field.currentText()), 'output' : os.path.join(JOB_OUTPUT_UNC, getpass.getuser(), job_uuid, image_filename), 'start' : start_frame, 'end' : end_frame, 'step' : str(self.step_field.value()), 'threads' : 0 }