def get_heldjobs(self): output = [] jobs = job_pool.job_container.get_held_jobs() output.append(Job.get_job_info_header()) for job in jobs: output.append(job.get_job_info()) return ''.join(output)
def get_highjobs(self): output = [] jobs = job_pool.job_container.get_high_priority_jobs() output.append(Job.get_job_info_header()) for job in jobs: output.append(job.get_job_info()) return "".join(output)
def get_newjobs(self): output = [] jobs = job_pool.job_container.get_unscheduled_jobs() output.append(Job.get_job_info_header()) for job in jobs: output.append(job.get_job_info()) return "".join(output)
def view_jobs(self, state): output = [] state = web.input().state if state == 'complete': jobs = web.job_pool.job_container.get_complete_jobs() elif state == 'held': jobs = web.job_pool.job_container.get_held_jobs() elif state == 'high': jobs = web.job_pool.job_container.get_high_priority_jobs() elif state == 'idle': jobs = web.job_pool.job_container.get_idle_jobs() elif state == 'new': jobs = web.job_pool.job_container.get_unscheduled_jobs() elif state == 'running': jobs = web.job_pool.job_container.get_running_jobs() elif state == 'sched': jobs = web.job_pool.job_container.get_scheduled_jobs() else: return '' output.append(Job.get_job_info_header()) for job in jobs: output.append(job.get_job_info()) return ''.join(output)
def get_heldjobs(self): jobs = job_pool.job_container.get_held_jobs() output = Job.get_job_info_header() for job in jobs: output += job.get_job_info() return output