fix: Add BookStack and Obsidian to periodic scheduler task_map#893
fix: Add BookStack and Obsidian to periodic scheduler task_map#893vorsengineer wants to merge 1 commit intoMODSetter:mainfrom
Conversation
|
Someone is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
BookStack (`BOOKSTACK_CONNECTOR`) and Obsidian (`OBSIDIAN_CONNECTOR`) were missing from the `task_map` in `schedule_checker_task.py`. This caused periodic/scheduled indexing to silently skip these connectors even when periodic sync was enabled in the UI. The tasks (`index_bookstack_pages_task`, `index_obsidian_vault_task`) exist and are registered in `connector_tasks.py` and routed to the connectors queue in `celery_app.py` — they were just never wired into the scheduler's dispatch map. FIX MODSetter#891 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
67707d9 to
9254e95
Compare
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 54e56e1..67707d9
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (1)
• surfsense_backend/app/tasks/celery_tasks/schedule_checker_task.py
|
@vorsengineer Thanks for your contributions. Can you please raise both PRs on the dev branch? |
There was a problem hiding this comment.
Review by RecurseML
🔍 Review performed on 67707d9..9254e95
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (1)
• surfsense_backend/app/tasks/celery_tasks/schedule_checker_task.py
JiwaniZakir
left a comment
There was a problem hiding this comment.
The change in schedule_checker_task.py correctly adds BOOKSTACK_CONNECTOR and OBSIDIAN_CONNECTOR to the task_map and imports their corresponding tasks — this is a straightforward and necessary fix to bring these two connectors in line with the others already handled by the periodic scheduler.
One thing worth verifying: the placement of index_bookstack_pages_task and index_obsidian_vault_task in the task_map dict (lines ~89-92) puts them between WEBCRAWLER_CONNECTOR and GOOGLE_DRIVE_CONNECTOR, breaking the loose alphabetical ordering that the rest of the map follows. For consistency and readability, BOOKSTACK_CONNECTOR should likely appear near the top of the map with other B-prefixed connectors, and OBSIDIAN_CONNECTOR somewhere in the middle. This is purely cosmetic but aligns with the style of the surrounding code.
It's also worth adding a test case (or extending an existing fixture) to schedule_checker_task tests that exercises the newly added connector types — currently there's no coverage signal in this diff that a scheduler run would correctly dispatch to index_bookstack_pages_task or index_obsidian_vault_task, so a regression here would be silent.
Summary
BOOKSTACK_CONNECTOR→index_bookstack_pages_tasktotask_mapinschedule_checker_task.pyOBSIDIAN_CONNECTOR→index_obsidian_vault_tasktotask_mapinschedule_checker_task.pyMotivation
Both BookStack and Obsidian connectors support periodic indexing in the UI (the frontend correctly saves
periodic_indexing_enabled,indexing_frequency_minutes, andnext_scheduled_at), but thecheck_periodic_schedulestask couldn't dispatch their indexing tasks because they were missing from thetask_map.The tasks exist in
connector_tasks.pyand are routed tosurfsense.connectorsqueue incelery_app.py— they were just never added to the scheduler's dispatch map.FIX #891
Test plan
connector_tasks.pyandcelery_app.py🤖 Generated with Claude Code
High-level PR Summary
This PR fixes a bug where BookStack and Obsidian connectors couldn't execute periodic indexing despite the UI allowing users to configure it. The fix adds the missing mappings for
BOOKSTACK_CONNECTORandOBSIDIAN_CONNECTORto thetask_mapdictionary in the periodic scheduler, along with the necessary imports for their indexing tasks. This allows thecheck_periodic_schedulestask to properly dispatch indexing jobs for these two connector types.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_backend/app/tasks/celery_tasks/schedule_checker_task.py