Skip to content

Commit ac14e4a

Browse files
authored
better-sigterm-handling (#387)
1 parent 171fec7 commit ac14e4a

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

.github/workflows/license-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
with:
5151
requirements: "backend/requirements-all.txt"
5252
fail: "Copyleft,Other,Error"
53-
exclude: '(category_encoders.*2\.7\..*|attrs.*25\.1\..*|referencing.*0\.36\..*|envier.*0\.5\.0|psycopg2.*2\.9\.3|fqdn.*1\.5\.1|pyzmq.*25\.1\.2|debugpy.*1\.6\.7|certifi.*2025\.1\.31|tqdm.*4\.67\..*|webencodings.*0\.5\.1|torch.*1\.10\.2.*|torch.*1\.11\.0.*|pytorch-ignite.*0\.4\.10.*|torchaudio.*0\.11\.0.*|torchvision.*0\.12\.0.*|terminado.*0\.15\.0|qudida.*0\.0\.4|expiringdict.*1\.2\.2|botocore.*1\.29\.80|orderedmultidict.*1\.0\.1|deepchecks.*)'
53+
exclude: '(category_encoders.*2\.7\..*|attrs.*25\.3\..*|referencing.*0\.36\..*|envier.*0\.5\.0|psycopg2.*2\.9\.3|fqdn.*1\.5\.1|pyzmq.*25\.1\.2|debugpy.*1\.6\.7|certifi.*2025\.1\.31|tqdm.*4\.67\..*|webencodings.*0\.5\.1|torch.*1\.10\.2.*|torch.*1\.11\.0.*|pytorch-ignite.*0\.4\.10.*|torchaudio.*0\.11\.0.*|torchvision.*0\.12\.0.*|terminado.*0\.15\.0|qudida.*0\.0\.4|expiringdict.*1\.2\.2|botocore.*1\.29\.80|orderedmultidict.*1\.0\.1|deepchecks.*)'
5454
# psycopg2 is LGPL 2
5555
# category_encoders is BSD https://github.com/scikit-learn-contrib/category_encoders/tree/master?tab=BSD-3-Clause-1-ov-file
5656
# attrs is MIT https://github.com/python-attrs/attrs/blob/main/LICENSE

bin/start.sh

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,10 @@ if [[ -v INIT_LOCAL_RAY_INSTANCE ]]; then
66
RAY_memory_monitor_refresh_ms=0 ray start --port=6399 --head
77
fi
88

9-
# A function that will get executed when a SIGTERM is sent to the script
10-
term_handler(){
11-
kill -- -$$
12-
}
13-
14-
# Trap SIGTERM
15-
trap 'term_handler' SIGTERM
16-
179
STARTAPP="uvicorn --factory deepchecks_monitoring.app:create_application --host 0.0.0.0 --workers 4 --log-level debug --proxy-headers --forwarded-allow-ips '*'"
1810

1911
if [[ -v DD_ENV ]]; then
2012
STARTAPP="ddtrace-run ${STARTAPP}"
2113
fi
2214

23-
# Start uvicorn in the background, whether it's with tracing or without
24-
eval "${STARTAPP} &"
25-
26-
# Wait indefinitely
27-
wait ${!}
15+
exec ${STARTAPP}

0 commit comments

Comments
 (0)