Here are the examples of the python api web.input.state taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
Example 1
Project: cloud-scheduler Source File: info_server.py
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)