File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "taskiq-aiohttp"
33description = " Taskiq integration with AioHTTP framework"
44authors = [" Taskiq team <taskiq@no-reply.com>" ]
55maintainers = [" Taskiq team <taskiq@no-reply.com>" ]
6- version = " 0.3.0 "
6+ version = " 0.3.1 "
77readme = " README.md"
88license = " LICENSE"
99classifiers = [
Original file line number Diff line number Diff line change @@ -96,11 +96,14 @@ async def startup(state: TaskiqState) -> None:
9696
9797 app = import_object (app_path )
9898
99- if not isinstance (app , web .Application ):
99+ if inspect .iscoroutinefunction (app ):
100+ app = await app ()
101+ elif inspect .isfunction (app ):
100102 app = app ()
101103
102- if inspect .iscoroutine (app ):
103- app = await app
104+ if isinstance (app , web .AppRunner ):
105+ app = app .app
106+
104107 if not isinstance (app , web .Application ):
105108 raise ValueError (f"{ app_path } is not an AioHTTP application." )
106109
You can’t perform that action at this time.
0 commit comments