Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.
TypeScript aeoai-agentai-searchanswer-engine-optimizationbrand-monitoringchatgptclaudecopilotdockergeminigeogoogle-ai-overviewsgrokmcpnextjsopen-sourceperplexityseosupabasetypescript
fix(server): keep a development server away from the job queue (#947)
Gökhan Geyik2f6f2892f449
diff --git a/server/src/server.js b/server/src/server.jsindex e62770e56..4ca05b45a 100644--- a/server/src/server.js+++ b/server/src/server.js@@ -609,6 +609,18 @@ const PORT = process.env.PORT || 80;server.listen(PORT, async () => {logger.info({ port: PORT, env: process.env.NODE_ENV }, 'server running');+ // Startup job maintenance acts on every job in the database: it fails all+ // 'active' jobs as interrupted, deletes old Cloro tasks and takes over+ // 'waiting' jobs. Only the deployed server owns those. A development+ // server pointed at the production database (nodemon restarting on every+ // save) was failing the live nightly runs in the middle of their work.+ // Keyed on 'development' rather than on 'production', so a deployment+ // whose env file leaves NODE_ENV unset still runs it.+ if (process.env.NODE_ENV === 'development') {+ logger.info('development: skipping job cleanup, recovery and the daily cron');+ return;+ }+await cleanupStaleJobs();await cleanupStalePendingTasks();