Update speedyf/main.py
This commit is contained in:
parent
33c94d64c1
commit
8804dcb9ad
@ -1,10 +1,16 @@
|
||||
from flask import Flask, render_template
|
||||
from flask import Flask, render_template, jsonify, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
job_manager = JobManager()
|
||||
@app.route('/', methods=['GET','POST'])
|
||||
def index():
|
||||
if request.method == 'GET':
|
||||
render(index.html)
|
||||
else:
|
||||
handleform()
|
||||
handleform()
|
||||
|
||||
@app.route('/job_status')
|
||||
def job_status():
|
||||
job_id = request.args.get('job_id')
|
||||
job_info = job_manager.get_job_status(job_id)
|
||||
return jsonify(job_info), 200
|
Loading…
Reference in New Issue
Block a user