open-notebook/api
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
..
routers fix: async insight creation to prevent transaction conflicts (#512) 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_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
CLAUDE.md docs: generate comprehensive CLAUDE.md reference documentation across codebase 2026-01-03 16:27:52 -03:00
client.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
command_service.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
context_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
embedding_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
episode_profiles_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
insights_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
main.py feat: add cascade deletion for notebooks with delete preview (#471) 2026-01-25 14:56:14 -03:00
models.py fix: async insight creation to prevent transaction conflicts (#512) 2026-01-31 15:51:27 -03:00
models_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
notebook_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
notes_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
podcast_api_service.py Version 1 (#160) 2025-10-18 12:46:22 -03:00
podcast_service.py refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
search_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
settings_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
sources_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00
transformations_service.py Feat/localization tests docker (#371) 2026-01-15 13:51:05 -03:00