(self, persist_path: Optional[Path] = None)
| 43 | """ |
| 44 | |
| 45 | def __init__(self, persist_path: Optional[Path] = None): |
| 46 | self._tasks: dict[str, Task] = {} |
| 47 | self._counter: int = 0 |
| 48 | self._lock = threading.Lock() |
| 49 | self._persist_path = persist_path |
| 50 | self._revision_log: list[dict] = [] |
| 51 | if persist_path and persist_path.exists(): |
| 52 | self._load() |
| 53 | |
| 54 | def create_task(self, description: str, parent_id: Optional[str] = None) -> Task: |
| 55 | """Create a new task and persist.""" |