You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to understand how FSMStrategy works alongside Event Isolation. My goal is to process events sequentially for each user per chat (or for the chat if it's a private chat with the bot) AND concurrently for multiple users.
The default settings include storage=MemoryStorage() and fsm_strategy=FSMStrategy.USER_IN_CHAT. However, these seem to have no effect without events_isolation=SimpleEventIsolation(), which is the sole implementation of BaseEventIsolation.
On the other hand, when using the dispatcher with the settings below, it appears that updates are handled globally and sequentially — messages from all users are processed one at a time, despite the FSMStrategy.USER_IN_CHAT setting.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there!
I'd like to understand how
FSMStrategy
works alongside Event Isolation. My goal is to process events sequentially for each user per chat (or for the chat if it's a private chat with the bot) AND concurrently for multiple users.The default settings include
storage=MemoryStorage()
andfsm_strategy=FSMStrategy.USER_IN_CHAT
. However, these seem to have no effect withoutevents_isolation=SimpleEventIsolation()
, which is the sole implementation ofBaseEventIsolation
.On the other hand, when using the dispatcher with the settings below, it appears that updates are handled globally and sequentially — messages from all users are processed one at a time, despite the
FSMStrategy.USER_IN_CHAT
setting.Setup
Flow
USER1
user1_message1
user1_message2
user1_message3
USER2
user2_message1
user2_message2
user2_message3
This flow is logically incorrect, given the
fsm_strategy=FSMStrategy.USER_IN_CHAT
.I'd be grateful for any help! Maybe this is a bug or everything is simplier that it looks.
Beta Was this translation helpful? Give feedback.
All reactions