(self)
| 79 | return sum(1 for t in self.tasks if t.status == STATUS_DONE) |
| 80 | |
| 81 | def _queue_path(self): |
| 82 | if self._path: |
| 83 | return self._path |
| 84 | SESSIONS_DIR.mkdir(exist_ok=True) |
| 85 | key = hashlib.md5(self.project_dir.encode()).hexdigest()[:8] |
| 86 | proj = Path(self.project_dir).name |
| 87 | ts = datetime.now().strftime('%H%M%S') |
| 88 | self._path = SESSIONS_DIR / f'queue_{proj}_{key}_{ts}.json' |
| 89 | return self._path |
| 90 | |
| 91 | def save(self): |
| 92 | path = self._queue_path() |