Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(self-host): stop auto-creating the per-minute QStash widget tick schedule (#21196)

Arvin Xu85168d50fd16
diff --git a/apps/server/src/router-hono/workflows/widget/handlers/tick.ts b/apps/server/src/router-hono/workflows/widget/handlers/tick.ts
index 18af451aba6..5a2f0e4db3a 100644
--- a/apps/server/src/router-hono/workflows/widget/handlers/tick.ts
+++ b/apps/server/src/router-hono/workflows/widget/handlers/tick.ts
@@ -28,8 +28,11 @@ interface TickPayload {
}
/**
- * Widget scheduler tick. Registered as a QStash Schedule (`lobe-widget-tick`,
- * see `scripts/serverLauncher/startServer.js`). In queue mode each due slot is
+ * Widget scheduler tick. Meant to run as a QStash Schedule (`lobe-widget-tick`).
+ * It is deliberately not created by `scripts/serverLauncher/startServer.js`:
+ * a per-minute schedule alone burns most of a free QStash plan's daily quota
+ * and starves the task/goal schedules, so self-hosted deployments register it
+ * themselves if they want widget scheduling. In queue mode each due slot is
* published to `run-widget` as `{ widgetId, slot }` (deduplicated per slot) and
* that handler claims it before running, and each stale reservation (a run
* whose worker died past its lease) as `{ widgetId, runId, leaseStartedAt }`
diff --git a/scripts/serverLauncher/startServer.js b/scripts/serverLauncher/startServer.js
index f4dd4ea02b3..8d40f1cb4e1 100644
--- a/scripts/serverLauncher/startServer.js
+++ b/scripts/serverLauncher/startServer.js
@@ -186,11 +186,6 @@ const QSTASH_SCHEDULES = [
id: 'lobe-goal-sweep',
path: '/api/workflows/goal/sweep',
},
- {
- cron: '* * * * *',
- id: 'lobe-widget-tick',
- path: '/api/workflows/widget/tick',
- },
];
// Function to create the recurring QStash schedules the server relies on