def job_set_results(self, params):
        queue = QueueCache.get(params['destination'], params['queue'],
                               params.get('setup_runtime') or None,
                               params.get('need_runtime') or None)
        self.set_output('exitcode', params['exitcode'])
        self.set_output('job', RemoteJob(queue, params['job_id']))

        if self.get_input('print_error') and params['exitcode'] != 0:
            # If it failed and 'print_error' is set, download and print stderr
            # then fail
            destination = self.interpreter.filePool.create_file(
                    prefix='vt_tmp_job_err_').name
            with ServerLogger.hide_output():
                queue.download(params['job_id'],
                               '_stderr',
                               destination=destination,
                               recursive=False)
            with open(destination, 'r') as fin:
                chunk = fin.read(4096)
                sys.stderr.write(chunk)
                while len(chunk) == 4096:
                    chunk = fin.read(4096)
                    if chunk:
                        sys.stderr.write(chunk)
            raise ModuleError(self,
                              "Job failed with status %d" % params['exitcode'])
Sets the output ports once the job is finished.
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/tej/init.py/BaseSubmitJob.job_set_results