|
@@ -10,11 +10,15 @@ from dongri_task import *
|
|
|
from collections import deque
|
|
|
import json
|
|
|
from concurrent.futures import ThreadPoolExecutor
|
|
|
+from flask_caching import Cache
|
|
|
|
|
|
# 全局线程池,限制最大线程数为1
|
|
|
executor = ThreadPoolExecutor(max_workers=1)
|
|
|
|
|
|
+cache = Cache(config={'CACHE_TYPE': 'null'}) # 使用 null 缓存类型
|
|
|
app = Flask(__name__)
|
|
|
+cache.init_app(app)
|
|
|
+app.config['TEMPLATES_AUTO_RELOAD'] = True
|
|
|
socketio = SocketIO(app, cors_allowed_origins="*")
|
|
|
event = threading.Event()
|
|
|
g_status_list = []
|