Bibo-Joshi · GitHub

  • Deprecates the @run_async decorator
  • Instead adds kwargs update and error_handler to DP.run_async() to allow proper error handling
  • Allows to specify that a callback should be run asynchronously via DP.add_handler/DP.add_error_handler

One problem: In the new setting it's currently not possible to make the handlers of a ConversationHandler be run asynchronously. Possible solutions:

  • When adding a CH via DP.add_handler(CH, run_asyn=True) make all handlers of the Conversation async
  • Set the run_async flag as parameter for Handler instead of as parameter for DP.add_handler
  • Somehow build an option for that into CH

Wanted to have that clarified before going for the tests, so WIP.

When ready, closes #682 and superseeds/closes #785

Read the original on github.com ↗