Skip to content

fix: Add BookStack and Obsidian to periodic scheduler task_map#893

Open
vorsengineer wants to merge 1 commit intoMODSetter:mainfrom
vorsengineer:fix/periodic-scheduler-missing-connectors
Open

fix: Add BookStack and Obsidian to periodic scheduler task_map#893
vorsengineer wants to merge 1 commit intoMODSetter:mainfrom
vorsengineer:fix/periodic-scheduler-missing-connectors

Conversation

@vorsengineer
Copy link

@vorsengineer vorsengineer commented Mar 20, 2026

Summary

  • Add BOOKSTACK_CONNECTORindex_bookstack_pages_task to task_map in schedule_checker_task.py
  • Add OBSIDIAN_CONNECTORindex_obsidian_vault_task to task_map in schedule_checker_task.py
  • Add corresponding imports for both tasks

Motivation

Both BookStack and Obsidian connectors support periodic indexing in the UI (the frontend correctly saves periodic_indexing_enabled, indexing_frequency_minutes, and next_scheduled_at), but the check_periodic_schedules task couldn't dispatch their indexing tasks because they were missing from the task_map.

The tasks exist in connector_tasks.py and are routed to surfsense.connectors queue in celery_app.py — they were just never added to the scheduler's dispatch map.

FIX #891

Test plan

  • Verified BookStack periodic indexing triggers automatically after this fix
  • Confirmed existing connector types still work (no regressions)
  • Both tasks are already registered in connector_tasks.py and celery_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_CONNECTOR and OBSIDIAN_CONNECTOR to the task_map dictionary in the periodic scheduler, along with the necessary imports for their indexing tasks. This allows the check_periodic_schedules task to properly dispatch indexing jobs for these two connector types.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/app/tasks/celery_tasks/schedule_checker_task.py

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Mar 20, 2026

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>
@vorsengineer vorsengineer force-pushed the fix/periodic-scheduler-missing-connectors branch from 67707d9 to 9254e95 Compare March 20, 2026 06:48
Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@MODSetter
Copy link
Owner

@vorsengineer Thanks for your contributions. Can you please raise both PRs on the dev branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: BookStack and Obsidian connectors missing from periodic scheduler task_map

2 participants