open-notebook/api/routers
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 Api podcast migration (#93) 2025-07-17 08:36:11 -03:00
auth.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
chat.py feat: message counting for chat sessions (#430) 2026-01-29 23:00:22 -03:00
commands.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
config.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
context.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
embedding.py feat: content-type aware chunking and unified embedding (#444) 2026-01-21 23:49:08 -03:00
embedding_rebuild.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
episode_profiles.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
insights.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
models.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
notebooks.py feat: add cascade deletion for notebooks with delete preview (#471) 2026-01-25 14:56:14 -03:00
notes.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
podcasts.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
search.py refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
settings.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
source_chat.py feat: message counting for chat sessions (#430) 2026-01-29 23:00:22 -03:00
sources.py fix: async insight creation to prevent transaction conflicts (#512) 2026-01-31 15:51:27 -03:00
speaker_profiles.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
transformations.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00