Commit 996f44f
authored
enhance(conversation): improve expired conversation cleanup (#360)
Cleanup of expired ephemeral conversations is now automatically
triggered during workspace persistence. This ensures that non-active
expired conversations are always cleaned up, even if the active
conversation has not changed.
The cleanup process has been optimized in the `jp_storage` crate by:
- Using parallel iteration to scan conversation directories.
- Implementing a specialized metadata parser that only extracts the
`expires_at` field, avoiding full JSON deserialization of conversation
metadata.
- Expanding the cleanup to cover both local workspace and user-global
storage roots.
The `remove_non_active_ephemeral_conversations` method has been removed
from `Workspace` in favor of integrating the logic directly into the
`persist` flow.
Signed-off-by: Jean Mertz <[email protected]>1 parent cd36398 commit 996f44f
3 files changed
+66
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
| 376 | + | |
| 377 | + | |
382 | 378 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 379 | + | |
389 | 380 | | |
390 | | - | |
391 | | - | |
392 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
393 | 408 | | |
394 | 409 | | |
395 | 410 | | |
396 | 411 | | |
397 | | - | |
| 412 | + | |
398 | 413 | | |
399 | 414 | | |
400 | 415 | | |
401 | 416 | | |
402 | 417 | | |
403 | | - | |
| 418 | + | |
404 | 419 | | |
405 | 420 | | |
406 | 421 | | |
| |||
425 | 440 | | |
426 | 441 | | |
427 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
428 | 475 | | |
429 | 476 | | |
430 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
241 | 242 | | |
242 | 243 | | |
243 | 244 | | |
| 245 | + | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
| |||
509 | 511 | | |
510 | 512 | | |
511 | 513 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | 514 | | |
523 | 515 | | |
524 | 516 | | |
| |||
0 commit comments