taskiq-python / taskiq

Distributed task queue with full async support
MIT License
866 stars 52 forks source link

Fix InMemoryBroker to use startup and shutdown middleware hooks #358

Open hawang-wish opened 2 months ago

hawang-wish commented 2 months ago

Hi,

This is the second patch I would like to introduce. Previously, we overrode the startup and shutdown to ensure both client and worker events would be handled properly. However, this made InMemoryBroker unable to handle startup and shutdown middleware hooks.

This change brings the handling of startup and shutdown middleware hooks back. Feel free to let me know if you have any concerns or suggestions!