python-cq 0.24.0__tar.gz → 0.25.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cq-0.24.0 → python_cq-0.25.0}/PKG-INFO +1 -1
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/__init__.py +2 -0
- python_cq-0.25.0/cq/_core/routing/dispatchers/functions.py +11 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/pyproject.toml +1 -1
- {python_cq-0.24.0 → python_cq-0.25.0}/.gitignore +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/LICENSE +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/common/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/common/typing.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/message.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/middleware.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/queuing/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/queuing/pump.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/queuing/queues/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/queuing/queues/abc.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/queuing/queues/memory.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/related_events.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/command_pipeline.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/di.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/dispatchers/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/dispatchers/abc.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/dispatchers/bus.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/dispatchers/lazy.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/dispatchers/pipe.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/handler.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/_core/routing/router.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/exceptions.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/ext/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/ext/injection.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/middlewares/__init__.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/middlewares/contextlib.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/middlewares/exc.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/middlewares/retry.py +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/cq/py.typed +0 -0
- {python_cq-0.24.0 → python_cq-0.25.0}/docs/index.md +0 -0
|
@@ -16,6 +16,7 @@ from ._core.routing.command_pipeline import ContextCommandPipeline
|
|
|
16
16
|
from ._core.routing.di import DIAdapter
|
|
17
17
|
from ._core.routing.dispatchers.abc import Dispatcher
|
|
18
18
|
from ._core.routing.dispatchers.bus import Bus
|
|
19
|
+
from ._core.routing.dispatchers.functions import dispatch_sequentially
|
|
19
20
|
from ._core.routing.dispatchers.pipe import ContextPipeline, Pipe
|
|
20
21
|
from ._core.routing.router import Router
|
|
21
22
|
|
|
@@ -46,6 +47,7 @@ __all__ = (
|
|
|
46
47
|
"Router",
|
|
47
48
|
"__router__",
|
|
48
49
|
"command_handler",
|
|
50
|
+
"dispatch_sequentially",
|
|
49
51
|
"event_handler",
|
|
50
52
|
"new_command_bus",
|
|
51
53
|
"new_event_bus",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from cq._core.routing.dispatchers.abc import Dispatcher
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
async def dispatch_sequentially[T, *Ts](
|
|
7
|
+
dispatcher: Dispatcher[T, Any],
|
|
8
|
+
/,
|
|
9
|
+
*messages: T,
|
|
10
|
+
) -> tuple[*Ts]:
|
|
11
|
+
return tuple([await dispatcher.dispatch(message) for message in messages])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|