File tree Expand file tree Collapse file tree
mpcontribs-kernel-gateway
mpcontribs-portal/supervisord Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,12 +12,11 @@ STATS_ARG=""
1212SERVER_APP=" mpcontribs.api:create_app()"
1313WAIT_FOR=" wait-for-it.sh $JUPYTER_GATEWAY_HOST -q -t 50"
1414
15+ set -x
16+
1517if [[ -n " $DD_TRACE_HOST " ]]; then
16- wait-for-it.sh $DD_TRACE_HOST -q -s -t 10 && STATS_ARG=" --statsd-host $DD_AGENT_HOST :8125"
18+ wait-for-it.sh " $DD_TRACE_HOST " -q -s -t 10 && STATS_ARG=" --statsd-host $DD_AGENT_HOST :8125" || echo " WARNING: datadog agent unreachable "
1719fi
1820
19- # if [[ -n "$STATS_ARG" ]]; then
20- # exec $WAIT_FOR -- ddtrace-run gunicorn $STATS_ARG $SERVER_APP
21- # else
22- exec $WAIT_FOR -- gunicorn $SERVER_APP
23- # fi
21+ [[ -n " $STATS_ARG " ]] && CMD=" ddtrace-run" || CMD=" "
22+ exec $WAIT_FOR -- $CMD gunicorn $STATS_ARG $SERVER_APP
Original file line number Diff line number Diff line change @@ -6,10 +6,11 @@ echo "$SUPERVISOR_PROCESS_NAME: waiting for $zzz seconds before start..."
66sleep $zzz
77
88CMD=" flask rq $1 "
9+ set -x
910
10- # if [[ -n "$DD_TRACE_HOST" ]]; then
11- # wait-for-it.sh $DD_TRACE_HOST -q -s -t 10 && CMD="ddtrace-run $CMD"
12- # fi
11+ if [[ -n " $DD_TRACE_HOST " ]]; then
12+ wait-for-it.sh " $DD_TRACE_HOST " -q -s -t 10 && CMD=" ddtrace-run $CMD " || echo " WARNING: datadog agent unreachable "
13+ fi
1314
14- exec wait-for-it.sh $JUPYTER_GATEWAY_HOST -q -s -t 50 -- \
15- wait-for-it.sh $MPCONTRIBS_API_HOST -q -s -t 15 -- $CMD
15+ exec wait-for-it.sh " $JUPYTER_GATEWAY_HOST " -q -s -t 50 -- \
16+ wait-for-it.sh " $MPCONTRIBS_API_HOST " -q -s -t 15 -- $CMD
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ environment=
2929 JUPYTER_GATEWAY_URL="{{ jupyter_gateway_url }}",
3030 JUPYTER_GATEWAY_HOST="{{ jupyter_gateway_host }}",
3131 DD_AGENT_HOST="{{ dd_agent_host }}",
32- DD_GEVENT_PATCH_ALL="true",
3332 DD_TRACE_SAMPLE_RATE="1",
3433 TINI_SUBREAPER="true"
3534
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33set -e
4- pmgrc =$HOME /.pmgrc.yaml
5- [[ ! -e $pmgrc ]] && echo " PMG_DUMMY_VAR: dummy" > $pmgrc
4+ PMGRC =$HOME /.pmgrc.yaml
5+ [[ ! -e $PMGRC ]] && echo " PMG_DUMMY_VAR: dummy" > " $PMGRC "
66
77CMD=" jupyter kernelgateway"
88
9- # NOTE ddtrace-run causes 100% CPU usage
10- # if [[ -n "$DD_TRACE_HOST" ]]; then
11- # wait-for-it.sh $DD_TRACE_HOST -q -s -t 10 && CMD="ddtrace-run $CMD"
12- # fi
9+ if [[ -n " $DD_TRACE_HOST " ]]; then
10+ wait-for-it.sh " $DD_TRACE_HOST " -q -s -t 10 && CMD=" ddtrace-run $CMD " || echo " WARNING: datadog agent unreachable"
11+ fi
1312
1413exec $CMD --KernelGatewayApp.log_format=' %(asctime)s,%(msecs)03d %(levelname)s [%(name)s] [%(module)s:%(lineno)d] - %(message)s'
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ environment=
2121 NODE_ENV="{{ node_env }}",
2222 DD_AGENT_HOST="{{ dd_agent_host }}",
2323 DD_LOG_LEVEL="{{ log_level }}",
24- DD_GEVENT_PATCH_ALL="true",
2524 DD_TRACE_SAMPLE_RATE="1",
2625 REDIS_ADDRESS="%(ENV_REDIS_ADDRESS)s",
2726 TINI_SUBREAPER="true",
You can’t perform that action at this time.
0 commit comments