# TODO: Only for testing, this will prevent any other dep services from getting started, relying entirely on configured deps in the runner-map
standalone=False
standalone=False
ifservice_name:
ifservice_name:
logger.info(f"Service '{service_name}' running in standalone mode")
logger.info(f"Service '{service_name}' running in standalone mode")
standalone=True
standalone=True
# TODO: We are signaling by setting env vars to downstream subprocesses. Let's pass flags on our invokation of serve_dynamo instead. That way the API is defined at the top level.
# Signal downstream workers to start system app by setting DYNAMO_SYSTEM_APP_* env vars for each worker. They are respectively consumed in serve_dynamo.py
ifenable_system_app:
env["DYNAMO_SYSTEM_APP_ENABLED"]="true"
ifsystem_app_port:
# Throw if not standalone mode. Should only be set in standalone mode.
# TODO: This might still cause issues if we are running in standalone, but have multiple workers, need to figure this one out
ifnotstandalone:
raiseValueError(
"Specifying system app port is only supported in standalone mode (i.e --service-name is set)"
# TODO: These defaults should be set by the provider. For now, I'm just adding them so that something is exposed when we do --use-default-health-checks
defdefault_liveness_check()->bool:
"""Default liveness check that always returns True."""
returnTrue
defdefault_readiness_check()->bool:
"""Default readiness check that always returns True."""