INNER CODE UNIT · Python

_ONE_DAY_IN_SECONDS

kubeflow/katib · cmd/suggestion/nas/darts/v1beta1/main.py:24

_ONE_DAY_IN_SECONDS = 60 * 60 * 24
DEFAULT_PORT = "0.0.0.0:6789"


def serve():
    print("Darts Suggestion Service")
    server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
    service = DartsService()
    api_pb2_grpc.add_SuggestionServicer_to_server(service, server)
    health_pb2_grpc.add_HealthServicer_to_server(service, server)
    server.add_insecure_port(DEFAULT_PORT)
    print("Listening...")
    server.start()
    try:
        while True:
            time.sleep(_ONE_DAY_IN_SECONDS)
    except KeyboardInterrupt:
        server.stop(0)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…