Replies: 5 comments
-
I'm not sure, because the URL that you provide is passed intact to the redis package. Any chance your |
Beta Was this translation helpful? Give feedback.
-
When I create the redis object I do it as below and it takes db number as a separate argument. So passing the URL intact is not enough? I remember it ignoring the db number in the URL when I had tried it earlier.
|
Beta Was this translation helpful? Give feedback.
-
@hem4nt I don't understand what is this code you are showing me. This package creates its own Redis connections from the URL that you pass, so what is the significance of your own method of creating Redis connections? |
Beta Was this translation helpful? Give feedback.
-
@miguelgrinberg, Sorry that code is from my app but not related to this package. I brought that here to point out that |
Beta Was this translation helpful? Give feedback.
-
No, Flask-SocketIO passes the URL to Redis. It is Redis that parses it to obtain the database number. See the Redis.from_url function. |
Beta Was this translation helpful? Give feedback.
-
I have two flask_socketio apps running which use
message_queue="redis://localhost:6379/2"
andmessage_queue="redis://localhost:6379/1"
respectively.But it looks like I'm doing it wrong or it is not honouring the database numbers
2
and1
but may be using0
as default because when Ibroadcast
some message from an external process, it gets broadcast from both the apps!In the external processes I initialise the app like this:
Can you please help?
Beta Was this translation helpful? Give feedback.
All reactions