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
Copy file name to clipboardExpand all lines: README.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ The adapter accepts various arguments for configuring lifespan, logging, HTTP, W
68
68
```python
69
69
handler = Mangum(
70
70
app,
71
-
enable_lifespan=True,
71
+
lifespan="auto",
72
72
log_level="info",
73
73
api_gateway_base_path=None,
74
74
text_mime_types=None,
@@ -80,17 +80,32 @@ handler = Mangum(
80
80
81
81
### Parameters
82
82
83
-
-`app` : ***ASGI application***
83
+
-`app` : **ASGI application**
84
84
85
85
An asynchronous callable that conforms to ASGI specification version 3.0. This will usually be a framework application instance that exposes a valid ASGI callable.
86
86
87
-
-`enable_lifespan` : **bool**
87
+
-`lifespan` : **str** (`auto`|`on`|`off`)
88
88
89
-
Specify whether or not to enable lifespan support. The adapter will automatically determine if lifespan is supported by the framework unless explicitly disabled.
89
+
Specify lifespan support option. Default: `auto`.
90
+
91
+
*`auto`
92
+
Application support for lifespan will be inferred.
93
+
94
+
Any error that occurs during startup will be logged and the request will continue being handled unless a `lifespan.startup.failed` event is sent by the application.
95
+
96
+
*`on`:
97
+
Application support for lifespan is explicitly set.
98
+
99
+
Any error that occurs during startup will be raised and a 500 response will be returned.
100
+
101
+
*`off`:
102
+
Application support for lifespan should be ignored.
103
+
104
+
The application will not enter the lifespan cycle context.
Copy file name to clipboardExpand all lines: docs/index.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ The adapter accepts various arguments for configuring lifespan, logging, HTTP, W
68
68
```python
69
69
handler = Mangum(
70
70
app,
71
-
enable_lifespan=True,
71
+
lifespan="auto",
72
72
log_level="info",
73
73
api_gateway_base_path=None,
74
74
text_mime_types=None,
@@ -80,17 +80,32 @@ handler = Mangum(
80
80
81
81
### Parameters
82
82
83
-
-`app` : ***ASGI application***
83
+
-`app` : **ASGI application**
84
84
85
85
An asynchronous callable that conforms to ASGI specification version 3.0. This will usually be a framework application instance that exposes a valid ASGI callable.
86
86
87
-
-`enable_lifespan` : **bool**
87
+
-`lifespan` : **str** (`auto`|`on`|`off`)
88
88
89
-
Specify whether or not to enable lifespan support. The adapter will automatically determine if lifespan is supported by the framework unless explicitly disabled.
89
+
Specify lifespan support option. Default: `auto`.
90
+
91
+
*`auto`
92
+
Application support for lifespan will be inferred.
93
+
94
+
Any error that occurs during startup will be logged and the request will continue being handled unless a `lifespan.startup.failed` event is sent by the application.
95
+
96
+
*`on`:
97
+
Application support for lifespan is explicitly set.
98
+
99
+
Any error that occurs during startup will be raised and a 500 response will be returned.
100
+
101
+
*`off`:
102
+
Application support for lifespan should be ignored.
103
+
104
+
The application will not enter the lifespan cycle context.
Copy file name to clipboardExpand all lines: docs/websockets.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ A connected client has sent a message. The adapter will retrieve the initial req
18
18
19
19
The client or the server disconnects from the API. The adapter will remove the connection from the backend.
20
20
21
-
###Backends
21
+
## Backends
22
22
23
23
A data source, such as a cloud database, is required in order to persist the connection identifiers in a 'serverless' environment. Any data source can be used as long as it is accessible remotely to the AWS Lambda function.
0 commit comments