Skip to content

Commit

Permalink
bug: fixed pipeline behaviors oder execution
Browse files Browse the repository at this point in the history
  • Loading branch information
chessenjoyer17 committed Jan 22, 2025
1 parent f90a825 commit 2a2a86a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ where = ["src"]

[project]
name = "bazario"
version = "0.4.0"
version = "0.4.1"
readme = "README.md"
authors = [{ name = "Alim Abrekov", email = "[email protected]" }]
description = "Lightweight handler routing library for modular apps."
Expand Down
6 changes: 3 additions & 3 deletions src/bazario/asyncio/chain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Reversible
from collections.abc import Iterable
from typing import Any

from bazario.asyncio.abc.handler import NotificationHandler, RequestHandler
Expand All @@ -10,11 +10,11 @@

def build_pipeline_behaviors_chain(
handler: RequestHandler | NotificationHandler,
behaviors: Reversible[PipelineBehavior],
behaviors: Iterable[PipelineBehavior],
) -> HandleNext:
current_behavior: HandleNext = handler.handle

for behavior in reversed(behaviors):
for behavior in behaviors:
current_behavior = _wrap_with_behavior(behavior, current_behavior)

return current_behavior
Expand Down
6 changes: 3 additions & 3 deletions src/bazario/chain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Reversible
from collections.abc import Iterable
from typing import Any

from bazario.abc.handler import NotificationHandler, RequestHandler
Expand All @@ -10,11 +10,11 @@

def build_pipeline_behaviors_chain(
handler: RequestHandler | NotificationHandler,
behaviors: Reversible[PipelineBehavior],
behaviors: Iterable[PipelineBehavior],
) -> HandleNext:
current_behavior: HandleNext = handler.handle

for behavior in reversed(behaviors):
for behavior in behaviors:
current_behavior = _wrap_with_behavior(behavior, current_behavior)

return current_behavior
Expand Down

0 comments on commit 2a2a86a

Please sign in to comment.