Get all registered projects. Returns: Dictionary mapping project names to their info dictionaries.
()
| 339 | |
| 340 | |
| 341 | def list_registered_projects() -> dict[str, dict[str, Any]]: |
| 342 | """ |
| 343 | Get all registered projects. |
| 344 | |
| 345 | Returns: |
| 346 | Dictionary mapping project names to their info dictionaries. |
| 347 | """ |
| 348 | _, SessionLocal = _get_engine() |
| 349 | session = SessionLocal() |
| 350 | try: |
| 351 | projects = session.query(Project).all() |
| 352 | return { |
| 353 | p.name: { |
| 354 | "path": p.path, |
| 355 | "created_at": p.created_at.isoformat() if p.created_at else None, |
| 356 | "default_concurrency": getattr(p, 'default_concurrency', 3) or 3 |
| 357 | } |
| 358 | for p in projects |
| 359 | } |
| 360 | finally: |
| 361 | session.close() |
| 362 | |
| 363 | |
| 364 | def get_project_info(name: str) -> dict[str, Any] | None: |
no test coverage detected