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