You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project is used to create mocked application and request
4
+
that you can use as a dependencies in your taskiq application.
5
+
6
+
7
+
It's useful because it runs all startup events of your application
8
+
and everything that you might expect in your application's state is
9
+
available inside of your tasks.
10
+
11
+
We suggest to use this library along with [taskiq-python/aiohttp-deps](https://github.com/taskiq-python/aiohttp-deps), because it might be super handy to reuse same dependencies of your application in your tasks.
12
+
13
+
To add an integration, you need to call the function `init` in your broker's module.
14
+
15
+
```python
16
+
import taskiq_aiohttp
17
+
18
+
broker =...
19
+
20
+
taskiq_aiohttp.init(broker, "project.module:app")
21
+
22
+
```
23
+
24
+
## How does it work?
25
+
26
+
It adds startup functions to the broker, so it imports your aiohttp application and creates a single worker-wide Request and Application objects that you can depend on.
27
+
28
+
THIS REQUEST IS NOT RELATED TO THE ACTUAL REQUESTS IN AioHTTP! This request won't have actual data about the request you were handling while sending a task.
0 commit comments