open-notebook/open_notebook/domain
Luis Novo 301dd4e20a
fix: async insight creation to prevent transaction conflicts (#512)
Migrate insight creation to the command system with automatic retry logic
to prevent SurrealDB transaction conflicts during batch imports.

Changes:
- Add create_insight_command with retry logic for transaction conflicts
- Add run_transformation_command for async transformation execution
- Make Source.add_insight() fire-and-forget (returns command_id)
- Update POST /sources/{id}/insights to return 202 Accepted immediately
- Frontend polls command status until complete, then refreshes
- Auto-update notebook page icon when source gains insights
- Add i18n keys for insight generation feedback

Related to #489
2026-01-31 15:51:27 -03:00
..
__init__.py refactor domain into a module 2024-10-30 14:08:05 -03:00
base.py feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
CLAUDE.md fix: async insight creation to prevent transaction conflicts (#512) 2026-01-31 15:51:27 -03:00
content_settings.py Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
notebook.py fix: async insight creation to prevent transaction conflicts (#512) 2026-01-31 15:51:27 -03:00
transformation.py refactor transformation, add graph and admin 2024-11-18 22:01:11 -03:00