Revert calendar-based cookbook scheduler

Reverts b98ee04 + 4ed48ba + a19b6d2.

Calendar events turned out to be the wrong abstraction for scheduling model serve windows. Pivoting to the existing ScheduledTask infrastructure (cron / daily / weekly recurrence, next_run tracking, edit-from-Tasks-tab UI) in a follow-up commit. The ScheduledTask path:

  - reuses dispatch logic the rest of the app already understands
  - drops the calendar dependency entirely (no auto-created "Cookbook" calendar, no calendar.js hook)
  - shows up in the Tasks UI that already exists for everything else

What this revert removes:
  - src/cookbook_scheduler.py — calendar reconciler
  - routes/cookbook_schedule_routes.py — /api/cookbook/schedule/* endpoints
  - static/js/cookbookSchedule.js — Schedule modal / settings card
  - cookbook_scheduler_enabled + cookbook_schedule_calendar_href settings keys
  - The window.cookbookOpenScheduleForm hook in calendar.js
  - The Schedule button + paired-button CSS in cookbookServe.js + style.css
This commit is contained in:
pewdiepie-archdaemon
2026-06-05 06:57:21 +09:00
parent b98ee04e2f
commit a260e0abd4
9 changed files with 0 additions and 1367 deletions
-16
View File
@@ -640,14 +640,6 @@ app.include_router(setup_shell_routes())
from routes.cookbook_routes import setup_cookbook_routes
app.include_router(setup_cookbook_routes())
# Cookbook scheduler — calendar-driven serve windows.
# Feature-flagged on the `cookbook_scheduler_enabled` setting (default
# off); disabling the setting silences the reconciler and the API
# refuses requests. Delete this block + src/cookbook_scheduler.py +
# routes/cookbook_schedule_routes.py to remove the feature entirely.
from routes.cookbook_schedule_routes import setup_cookbook_schedule_routes
app.include_router(setup_cookbook_schedule_routes())
# Hardware model fitting (cookbook "What Fits?" tab)
from routes.hwfit_routes import setup_hwfit_routes
app.include_router(setup_hwfit_routes())
@@ -1069,14 +1061,6 @@ async def _startup_event():
logger.warning(f"Nightly skill audit failed: {e}")
_startup_tasks.append(asyncio.create_task(_skill_audit_nightly_loop()))
# Cookbook scheduler reconcile loop. Internally checks the
# cookbook_scheduler_enabled setting on every tick, so leaving this
# task running with the feature disabled costs ~one settings lookup
# per minute. Remove this line to dispose of the feature.
from src.cookbook_scheduler import reconcile_loop as _cookbook_reconcile_loop
_startup_tasks.append(asyncio.create_task(_cookbook_reconcile_loop()))
logger.info("Application startup complete")
async def _shutdown_event():