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)