This commit is contained in:
Zhang Muyu
2023-09-30 16:08:25 +08:00
parent ff1fb2ebb2
commit 5f476508ad
2 changed files with 6 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ from gevent import pywsgi
from main.main import *
from main.distance import *
from main.sa_pa import *
from settings import *
import json
import os
@@ -22,7 +23,7 @@ def common():
'image': data,
}
response = make_response(res)
os.remove(path)
AUTO_CLEAN and os.remove(path)
return response
@app.route('/api/pov-element/distance', methods=["GET"])
@@ -35,7 +36,7 @@ def distance():
'image': data,
}
response = make_response(res)
os.remove(path)
AUTO_CLEAN and os.remove(path)
return response
@app.route('/api/pov-element/service', methods=["GET"])
@@ -47,7 +48,7 @@ def service():
'image': data,
}
response = make_response(res)
os.remove(path)
AUTO_CLEAN and os.remove(path)
return response
if __name__ == '__main__':

View File

@@ -23,3 +23,5 @@ THEME_MAP = {
'g': COLOR_GREEN,
'r': COLOR_RED
}
AUTO_CLEAN = False