File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ def __init__(self) -> None:
48
48
self .default_headers : list [tuple [bytes , bytes ]] = []
49
49
50
50
51
+ class ShutdownTrigger :
52
+ is_shutdown_triggered : bool = False
53
+
54
+
51
55
class Server :
52
56
def __init__ (self , config : Config ) -> None :
53
57
self .config = config
@@ -261,7 +265,7 @@ async def on_tick(self, counter: int) -> bool:
261
265
async def shutdown (self , sockets : list [socket .socket ] | None = None ) -> None :
262
266
if self .config .shutdown_delay :
263
267
logger .info (f"Shutting down in { self .config .shutdown_delay } seconds" )
264
- self . config . app . uvicorn_shutdown_triggered = True
268
+ ShutdownTrigger . is_shutdown_triggered = True
265
269
await asyncio .sleep (self .config .shutdown_delay )
266
270
267
271
logger .info ("Shutting down" )
You can’t perform that action at this time.
0 commit comments