def status(self, uuid): job = Job.find(self.__dir_jobs, uuid) if job == None: return view.render('error.html', error='Job not found!') status = job.status() if status == 'Error': return view.render('error.html', error='Generation failed!') elif status == 'Done': return view.render('done.html', name=job.description.name, uuid=uuid) return view.render(uuid=uuid, name=job.description.name, status=status)
def download(self, uuid): job = Job.find(self.__dir_jobs, uuid) if not job or job.status() != 'Done': return self.status(uuid) return cherrypy.lib.static.serve_download(job.map_file(), job.description.name + '.xcm')
def download(self, uuid): job = Job.find(self.__dir_jobs, uuid) if not job or job.status() != 'Done': return self.status(uuid) return cherrypy.lib.static.serve_download( job.map_file(), job.description.name + '.xcm')