Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
2d59861e
"lib/bindings/c/vscode:/vscode.git/clone" did not exist on "3718da8c689a558b7958f462bc3d00a1bbcced3e"
Unverified
Commit
2d59861e
authored
Oct 08, 2025
by
Thomas Montfort
Committed by
GitHub
Oct 08, 2025
Browse files
fix: frontend component handles graceful shutdown (#3481)
parent
07207a1b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
components/src/dynamo/frontend/main.py
components/src/dynamo/frontend/main.py
+14
-1
No files found.
components/src/dynamo/frontend/main.py
View file @
2d59861e
...
...
@@ -21,6 +21,7 @@ import logging
import
os
import
pathlib
import
re
import
signal
import
uvloop
...
...
@@ -226,7 +227,15 @@ async def async_main():
if
prefix
:
os
.
environ
[
"DYN_METRICS_PREFIX"
]
=
flags
.
metrics_prefix
runtime
=
DistributedRuntime
(
asyncio
.
get_running_loop
(),
is_static
)
loop
=
asyncio
.
get_running_loop
()
runtime
=
DistributedRuntime
(
loop
,
is_static
)
def
signal_handler
():
asyncio
.
create_task
(
graceful_shutdown
(
runtime
))
for
sig
in
(
signal
.
SIGTERM
,
signal
.
SIGINT
):
loop
.
add_signal_handler
(
sig
,
signal_handler
)
if
flags
.
router_mode
==
"kv"
:
router_mode
=
RouterMode
.
KV
...
...
@@ -289,6 +298,10 @@ async def async_main():
pass
async
def
graceful_shutdown
(
runtime
):
runtime
.
shutdown
()
def
main
():
uvloop
.
run
(
async_main
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment