isolate with gevent

This commit is contained in:
dgtlmoon
2025-05-16 18:39:52 +02:00
parent aee2c6e028
commit 655658b5b8
2 changed files with 4 additions and 1 deletions

View File

@@ -152,7 +152,7 @@ def init_socketio(app, datastore):
# Use the threading async_mode instead of eventlet # Use the threading async_mode instead of eventlet
# This avoids the need for monkey patching eventlet, # This avoids the need for monkey patching eventlet,
# Which leads to problems with async playwright etc # Which leads to problems with async playwright etc
async_mode = 'threading' async_mode = 'gevent'
logger.info(f"Using {async_mode} mode for Socket.IO") logger.info(f"Using {async_mode} mode for Socket.IO")
# Restrict SocketIO CORS to same origin by default, can be overridden with env var # Restrict SocketIO CORS to same origin by default, can be overridden with env var

View File

@@ -98,6 +98,9 @@ levenshtein
# Needed for > 3.10, https://github.com/microsoft/playwright-python/issues/2096 # Needed for > 3.10, https://github.com/microsoft/playwright-python/issues/2096
greenlet >= 3.0.3 greenlet >= 3.0.3
# Used for realtime socketio mode (so its a different driver to eventlet/threading not to interfere with playwright)
gevent
# Pinned or it causes problems with flask_expects_json which seems unmaintained # Pinned or it causes problems with flask_expects_json which seems unmaintained
referencing==0.35.1 referencing==0.35.1