(address: str, name: Optional[str])
| 695 | ), |
| 696 | ) |
| 697 | def status(address: str, name: Optional[str]): |
| 698 | warn_if_agent_address_set() |
| 699 | |
| 700 | serve_details = ServeInstanceDetails( |
| 701 | **ServeSubmissionClient(address).get_serve_details() |
| 702 | ) |
| 703 | status = asdict(serve_details._get_status()) |
| 704 | |
| 705 | # Ensure multi-line strings in app_status is dumped/printed correctly |
| 706 | if name is None: |
| 707 | print( |
| 708 | yaml.dump( |
| 709 | # Ensure exception traceback in app_status are printed correctly |
| 710 | process_dict_for_yaml_dump(status), |
| 711 | Dumper=ServeDeploySchemaDumper, |
| 712 | default_flow_style=False, |
| 713 | sort_keys=False, |
| 714 | ), |
| 715 | end="", |
| 716 | ) |
| 717 | else: |
| 718 | if name not in serve_details.applications: |
| 719 | cli_logger.error(f'Application "{name}" does not exist.') |
| 720 | else: |
| 721 | print( |
| 722 | yaml.dump( |
| 723 | # Ensure exception tracebacks in app_status are printed correctly |
| 724 | process_dict_for_yaml_dump(status["applications"][name]), |
| 725 | Dumper=ServeDeploySchemaDumper, |
| 726 | default_flow_style=False, |
| 727 | sort_keys=False, |
| 728 | ), |
| 729 | end="", |
| 730 | ) |
| 731 | |
| 732 | |
| 733 | @cli.command( |
nothing calls this directly
no test coverage detected
searching dependent graphs…