mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-04 21:47:28 +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:
@@ -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