From 2ba1f32a6735b6394fbd1bbe7ac0047ee2b509b3 Mon Sep 17 00:00:00 2001 From: zzh Date: Mon, 15 Dec 2025 09:53:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BD=91=E9=A1=B5=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E6=85=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index c63e463..d0318cf 100644 --- a/server/app.py +++ b/server/app.py @@ -54,6 +54,7 @@ def init_db(): ts TEXT, read INTEGER DEFAULT 0 )''') + c.execute('CREATE INDEX IF NOT EXISTS idx_notifications_user_read ON notifications(user_id, read)') c.execute('''CREATE TABLE IF NOT EXISTS mac_batches( id INTEGER PRIMARY KEY AUTOINCREMENT, mac TEXT, @@ -6058,4 +6059,4 @@ init_db() if __name__ == '__main__': - app.run(host='0.0.0.0', port=int(os.environ.get('PORT', '5000'))) + app.run(host='0.0.0.0', port=int(os.environ.get('PORT', '5000')), threaded=True)