Skip to content

Commit

Permalink
chore: upgrade taskiq
Browse files Browse the repository at this point in the history
  • Loading branch information
fubuloubu committed Dec 20, 2023
1 parent c2f8cd9 commit bc5b6e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
8 changes: 4 additions & 4 deletions silverback/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
"""
Expand All @@ -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]:
"""
Expand All @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit bc5b6e1

Please sign in to comment.