Handling the same update concurrently and/or independently #1033
-
I want to receive all incoming updates, save those updates, and then check if any of them are messages with links in them. Crucially though, I do not want a failure in the update saving code to affect the next handler in the chain. I realize that I can tag an This is where I'm currently at. Here, every update receives stops in the first branch and never continues on to let handler = dptree::entry()
.branch(dptree::endpoint(save_raw_update))
.branch(Update::filter_message().branch(dptree::endpoint(save_link))); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think you do need |
Beta Was this translation helpful? Give feedback.
I think you do need
inspect
(potentially with atokio::spawn
or a queue, so that saving does not throttle the main update handliong) (or amap
). The thing aboutendpoint
is that it always stops execution, so nothing can be executed after it.