mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-08 08:47:32 +08:00
[Enhance][Bug fix] Waitress & API token
- Fix a bug that using API token in config file will not success - Add deployment mode `waitress`
This commit is contained in:
@@ -6,7 +6,7 @@ class Config:
|
||||
HOST = '0.0.0.0'
|
||||
PORT = 80
|
||||
|
||||
USE_GEVENT_WSGI = False
|
||||
DEPLOY_MODE = 'flask_multithread'
|
||||
USE_PROXY_FIX = False
|
||||
USE_CORS = False
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import sqlite3
|
||||
import traceback
|
||||
from atexit import register
|
||||
|
||||
from flask import current_app
|
||||
|
||||
@@ -367,5 +368,7 @@ class MemoryDatabase:
|
||||
'''create index if not exists download_token_1 on download_token (song_id, file_name);''')
|
||||
self.conn.commit()
|
||||
|
||||
def atexit(self):
|
||||
self.conn.close()
|
||||
|
||||
@register
|
||||
def atexit():
|
||||
MemoryDatabase.conn.close()
|
||||
|
||||
Reference in New Issue
Block a user