新增检测时间
This commit is contained in:
parent
8e0fdd0f90
commit
7b6e7bdc24
7
app.py
7
app.py
|
|
@ -3,6 +3,7 @@ import detect_gitee, detect_trustie
|
|||
import re
|
||||
import operator
|
||||
import redis
|
||||
import time
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
|
@ -84,6 +85,8 @@ def parse_trustie(PR_url, error):
|
|||
@app.route('/result',methods = ['POST', 'GET'])
|
||||
def output():
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
if request.method == "GET":
|
||||
result = request
|
||||
|
||||
|
|
@ -97,6 +100,8 @@ def output():
|
|||
print("trustie")
|
||||
re = parse_trustie(PR_url, error)
|
||||
|
||||
print("time cost: ", time.time() - start_time)
|
||||
|
||||
if re["error"] == 1:
|
||||
return render_template("error.html", result=locals())
|
||||
else:
|
||||
|
|
@ -116,6 +121,8 @@ def output():
|
|||
print("trustie")
|
||||
re = parse_trustie(PR_url, error)
|
||||
|
||||
print("time cost: ", time.time() - start_time)
|
||||
|
||||
if re["error"] == 1:
|
||||
return render_template("error.html", result=locals())
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue