Update speedyf/main.py
This commit is contained in:
parent
42caef4beb
commit
2464c9bf7c
@ -2,12 +2,20 @@ from flask import Flask, render_template, jsonify, request
|
||||
|
||||
app = Flask(__name__)
|
||||
job_manager = JobManager()
|
||||
@app.route('/', methods=['GET','POST'])
|
||||
|
||||
def generate_uuid():
|
||||
return "random uuid"
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
if request.method == 'GET':
|
||||
render(index.html)
|
||||
else:
|
||||
handleform()
|
||||
|
||||
@app.route('/new_job', methods=['POST'])
|
||||
def new_job():
|
||||
## READ FORM, WRITE FILE TO DISK, CALL JOB RUNNER, RETURN JOB_ID
|
||||
job_id = generate_uuid()
|
||||
ctx = {job_id: job_id, job_manager: job_manager}
|
||||
handle_file(file_path, ctx)
|
||||
|
||||
@app.route('/job_status')
|
||||
def job_status():
|
||||
|
Loading…
Reference in New Issue
Block a user