Sync system was timing out because discovery endpoints (keyword, changes) also ran schema extraction (~10-15s per tool). Now discovery is fast (npm metadata + DB writes only) and a new /api/sync/enrich endpoint handles schema extraction in time-budgeted chunks. Railway executor was crashing without restarting due to unhandled promise rejections, no restart policy, and no health checks. Added crash protection, graceful shutdown, cache size limits, railway.toml with ALWAYS restart policy, and upgraded Deno from 1.39 to 2.1.9. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
77 lines
1.6 KiB
JSON
77 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://openapi.vercel.sh/vercel.json",
|
|
"buildCommand": "pnpm run build:web",
|
|
"outputDirectory": "apps/web/.next",
|
|
"installCommand": "pnpm install",
|
|
"framework": "nextjs",
|
|
"git": {
|
|
"deploymentEnabled": {
|
|
"main": true
|
|
}
|
|
},
|
|
"github": {
|
|
"silent": false,
|
|
"autoJobCancelation": true
|
|
},
|
|
"headers": [
|
|
{
|
|
"source": "/(.*)",
|
|
"headers": [
|
|
{
|
|
"key": "Strict-Transport-Security",
|
|
"value": "max-age=31536000; includeSubDomains; preload"
|
|
},
|
|
{
|
|
"key": "X-Content-Type-Options",
|
|
"value": "nosniff"
|
|
},
|
|
{
|
|
"key": "X-Frame-Options",
|
|
"value": "DENY"
|
|
},
|
|
{
|
|
"key": "X-XSS-Protection",
|
|
"value": "1; mode=block"
|
|
},
|
|
{
|
|
"key": "Referrer-Policy",
|
|
"value": "strict-origin-when-cross-origin"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"crons": [
|
|
{
|
|
"path": "/api/sync/changes",
|
|
"schedule": "0 */4 * * *"
|
|
},
|
|
{
|
|
"path": "/api/sync/keyword",
|
|
"schedule": "0 */6 * * *"
|
|
},
|
|
{
|
|
"path": "/api/sync/enrich",
|
|
"schedule": "*/2 * * * *"
|
|
},
|
|
{
|
|
"path": "/api/sync/metrics",
|
|
"schedule": "0 0 * * *"
|
|
},
|
|
{
|
|
"path": "/api/sync/stats-snapshot",
|
|
"schedule": "0 0 * * *"
|
|
},
|
|
{
|
|
"path": "/api/sync/cleanup-activity",
|
|
"schedule": "0 3 * * *"
|
|
},
|
|
{
|
|
"path": "/api/cron/discord-summary",
|
|
"schedule": "0 9 * * *"
|
|
},
|
|
{
|
|
"path": "/api/cron/use-cases",
|
|
"schedule": "0 0 * * *"
|
|
}
|
|
]
|
|
}
|