def start_job_service() -> None: """ Start Feast Job Service """ log_fmt = "%(asctime)s %(levelname)s %(message)s" logging.basicConfig(level=logging.INFO, format=log_fmt) client = feast.Client() if client._config.getboolean(opt.JOB_SERVICE_ENABLE_CONTROL_LOOP): # Start the control loop thread only if it's enabled from configs thread = threading.Thread(target=start_control_loop, daemon=True) thread.start() server = grpc.server(ThreadPoolExecutor(), interceptors=(LoggingInterceptor(), )) JobService_pb2_grpc.add_JobServiceServicer_to_server( JobServiceServicer(client), server) HealthService_pb2_grpc.add_HealthServicer_to_server( HealthServicer(), server) server.add_insecure_port("[::]:6568") server.start() logging.info("Feast Job Service is listening on port :6568") server.wait_for_termination()
def start_job_service(): """ Start Feast Job Service """ server = grpc.server(ThreadPoolExecutor()) JobService_pb2_grpc.add_JobServiceServicer_to_server(JobServiceServicer(), server) HealthService_pb2_grpc.add_HealthServicer_to_server(HealthServicer(), server) server.add_insecure_port("[::]:6568") server.start() print("Feast job server listening on port :6568") server.wait_for_termination()
def start_job_service(): """ Start Feast Job Service """ log_fmt = "%(asctime)s %(levelname)s %(message)s" logging.basicConfig(level=logging.INFO, format=log_fmt) server = grpc.server(ThreadPoolExecutor(), interceptors=(LoggingInterceptor(), )) JobService_pb2_grpc.add_JobServiceServicer_to_server( JobServiceServicer(), server) HealthService_pb2_grpc.add_HealthServicer_to_server( HealthServicer(), server) server.add_insecure_port("[::]:6568") server.start() print("Feast job server listening on port :6568") server.wait_for_termination()