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