|
@@ -168,8 +168,8 @@ def tongce():
|
|
|
@app.route('/tongce_data', methods=['GET', 'POST'])
|
|
|
def tongce_data():
|
|
|
response = {}
|
|
|
+ tongce = TongCe()
|
|
|
try:
|
|
|
- tongce = TongCe()
|
|
|
tongce.table_type_insert()
|
|
|
result = tongce.lingdi_data_scores()
|
|
|
response['code'] = 0
|
|
@@ -179,6 +179,8 @@ def tongce_data():
|
|
|
response['code'] = 1
|
|
|
response['message'] = '失败:' + str(e)
|
|
|
return json.dumps(response, ensure_ascii=False)
|
|
|
+ finally:
|
|
|
+ tongce.close()
|
|
|
return json.dumps(response, ensure_ascii=False)
|
|
|
|
|
|
|