Increased timeout limit
This commit is contained in:
@@ -66,4 +66,5 @@ CMD python -m alpine_bits_python.run_api \
|
|||||||
--access-log \
|
--access-log \
|
||||||
--forwarded-allow-ips "${FORWARDED_ALLOW_IPS:-127.0.0.1}" \
|
--forwarded-allow-ips "${FORWARDED_ALLOW_IPS:-127.0.0.1}" \
|
||||||
--proxy-headers \
|
--proxy-headers \
|
||||||
--no-server-header
|
--no-server-header \
|
||||||
|
--timeout-graceful-shutdown 300
|
||||||
@@ -81,6 +81,15 @@ def parse_args() -> argparse.Namespace:
|
|||||||
default=False,
|
default=False,
|
||||||
help="Disable Server header in responses (default: False)",
|
help="Disable Server header in responses (default: False)",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--timeout-graceful-shutdown",
|
||||||
|
type=int,
|
||||||
|
default=300,
|
||||||
|
help=(
|
||||||
|
"Graceful shutdown timeout in seconds. Workers have this long to finish "
|
||||||
|
"background tasks before being killed (default: 300)"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
@@ -112,4 +121,5 @@ if __name__ == "__main__":
|
|||||||
forwarded_allow_ips=args.forwarded_allow_ips,
|
forwarded_allow_ips=args.forwarded_allow_ips,
|
||||||
proxy_headers=args.proxy_headers,
|
proxy_headers=args.proxy_headers,
|
||||||
server_header=not args.no_server_header,
|
server_header=not args.no_server_header,
|
||||||
|
timeout_graceful_shutdown=args.timeout_graceful_shutdown,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user