Start current database service
()
| 176 | |
| 177 | @service.command |
| 178 | def start(): # noqa: F811 |
| 179 | """Start current database service""" |
| 180 | try: |
| 181 | current_context = get_current_context() |
| 182 | graph_identifier = current_context.context |
| 183 | |
| 184 | status = list_service_status() |
| 185 | for s in status: |
| 186 | if s.graph_id == graph_identifier: |
| 187 | if s.status != "Running": |
| 188 | info(f"Starting service on graph {graph_identifier}...") |
| 189 | start_service(graph_identifier) |
| 190 | succ("Service restarted.") |
| 191 | else: |
| 192 | info("Service is running...") |
| 193 | except Exception as e: |
| 194 | err(f"Failed to start service: {str(e)}") |
| 195 | |
| 196 | |
| 197 | @service.command |
nothing calls this directly
no test coverage detected