How do FSMStrategy and Event Isolation mechanism work? #1486
Unanswered
rumrunner0
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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