Skip to content

Commit 2c2905b

Browse files
committed
testing redis
1 parent 680d594 commit 2c2905b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.idea/workspace.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Server.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ class Settings(BaseSettings):
2929

3030
app = Flask(__name__)
3131
app.config['SECRET_KEY'] = "test key"
32-
socketio = SocketIO(app, message_queue=f'{REDIS_IP}:{REDIS_PORT}', cors_allowed_origins="*")
33-
3432
app.config['SESSION_TYPE'] = 'redis'
3533
app.config['SESSION_PERMANENT'] = False
3634
app.config['SESSION_USE_SIGNER'] = True
37-
app.config['SESSION_REDIS'] = redis.from_url('redis://redis-svc:6379')
35+
app.config['SESSION_REDIS'] = redis.from_url(f'{REDIS_IP}:{REDIS_PORT}')
36+
Session(app)
37+
socketio = SocketIO(app, message_queue=f'{REDIS_IP}:{REDIS_PORT}', cors_allowed_origins="*")
38+
39+
3840

3941
users_in_room = {}
4042
rooms_sid = {}

0 commit comments

Comments
 (0)