Update a project's path (for relocating projects). Args: name: The project name. new_path: The new absolute path. Returns: True if updated, False if project wasn't found.
(name: str, new_path: Path)
| 387 | |
| 388 | |
| 389 | def update_project_path(name: str, new_path: Path) -> bool: |
| 390 | """ |
| 391 | Update a project's path (for relocating projects). |
| 392 | |
| 393 | Args: |
| 394 | name: The project name. |
| 395 | new_path: The new absolute path. |
| 396 | |
| 397 | Returns: |
| 398 | True if updated, False if project wasn't found. |
| 399 | """ |
| 400 | new_path = Path(new_path).resolve() |
| 401 | |
| 402 | with _get_session() as session: |
| 403 | project = session.query(Project).filter(Project.name == name).first() |
| 404 | if not project: |
| 405 | return False |
| 406 | |
| 407 | project.path = new_path.as_posix() |
| 408 | |
| 409 | return True |
| 410 | |
| 411 | |
| 412 | def get_project_concurrency(name: str) -> int: |
nothing calls this directly
no test coverage detected