From bc5b6e1420434fe2ac4779e4cbbff95bcd7f2ad7 Mon Sep 17 00:00:00 2001 From: fubuloubu <3859395+fubuloubu@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:16:42 -0500 Subject: [PATCH] chore: upgrade taskiq --- setup.py | 2 +- silverback/application.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 2cb79ec1..bd8015d9 100644 --- a/setup.py +++ b/setup.py @@ -71,7 +71,7 @@ "eth-ape>=0.7.0,<1.0", "eth-pydantic-types", # Use same version as eth-ape "pydantic_settings", # Use same version as eth-ape - "taskiq[metrics]>=0.6.0,<0.7.0", + "taskiq[metrics]>=0.10.4,<0.11.0", ], entry_points={ "console_scripts": ["silverback=silverback._cli:cli"], diff --git a/silverback/application.py b/silverback/application.py index 527b85f5..75717c91 100644 --- a/silverback/application.py +++ b/silverback/application.py @@ -127,7 +127,7 @@ def get_startup_handler(self) -> Optional[AsyncTaskiqDecoratedTask]: Returns: Optional[AsyncTaskiqDecoratedTask]: Returns decorated task, if one has been created. """ - return self.broker.available_tasks.get("silverback_startup") + return self.broker.find_task("silverback_startup") def get_shutdown_handler(self) -> Optional[AsyncTaskiqDecoratedTask]: """ @@ -136,7 +136,7 @@ def get_shutdown_handler(self) -> Optional[AsyncTaskiqDecoratedTask]: Returns: Optional[AsyncTaskiqDecoratedTask]: Returns decorated task, if one has been created. """ - return self.broker.available_tasks.get("silverback_shutdown") + return self.broker.find_task("silverback_shutdown") def get_block_handler(self) -> Optional[AsyncTaskiqDecoratedTask]: """ @@ -145,7 +145,7 @@ def get_block_handler(self) -> Optional[AsyncTaskiqDecoratedTask]: Returns: Optional[AsyncTaskiqDecoratedTask]: Returns decorated task, if one has been created. """ - return self.broker.available_tasks.get("block") + return self.broker.find_task("block") def get_event_handler( self, event_target: AddressType, event_name: str @@ -160,7 +160,7 @@ def get_event_handler( Returns: Optional[AsyncTaskiqDecoratedTask]: Returns decorated task, if one has been created. """ - return self.broker.available_tasks.get(f"{event_target}/event/{event_name}") + return self.broker.find_task(f"{event_target}/event/{event_name}") def on_( self,