Skip to content

Commit a156cd4

Browse files
committed
Fixed some issues with app.
Signed-off-by: Pavel Kirilin <win10@list.ru>
1 parent 426b43f commit a156cd4

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

taskiq_aiohttp/initializer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def startup(state: TaskiqState) -> None:
4848
if not isinstance(local_app, web.Application):
4949
raise ValueError(f"{app_path} is not an AioHTTP application.")
5050

51-
handler = RequestHandler(app._make_handler(), loop=loop)
51+
handler = RequestHandler(local_app._make_handler(), loop=loop)
5252
handler.transport = asyncio.Transport()
5353
request = web.Request(
5454
RawRequestMessage(
@@ -78,19 +78,19 @@ async def startup(state: TaskiqState) -> None:
7878
match_dict={},
7979
route=SystemRoute(web.HTTPBadRequest()),
8080
)
81-
request._match_info._apps = app._subapps
82-
request._match_info._current_app = app
81+
request._match_info._apps = local_app._subapps
82+
request._match_info._current_app = local_app
8383

8484
broker.add_dependency_context(
8585
{
86-
web.Application: app,
86+
web.Application: local_app,
8787
web.Request: request,
8888
},
8989
)
9090

91-
state.aiohttp_app = app
92-
app.router._resources = []
93-
await app.startup()
91+
state.aiohttp_app = local_app
92+
local_app.router._resources = []
93+
await local_app.startup()
9494

9595
return startup
9696

0 commit comments

Comments
 (0)