- Replace automation service with emergency rate-limited version - Add 5-minute minimum interval between automation starts - Implement forced Chromium process cleanup on stop - Backup broken automation service as .broken file - Emergency service prevents multiple simultaneous automations - Fixed 1400+ Chromium process accumulation issue - Tested and confirmed: rate limiting works, processes stay at 0
19 lines
532 B
JavaScript
19 lines
532 B
JavaScript
import { emergencyAutomation } from '@/lib/emergency-automation'
|
|
|
|
export async function POST(request) {
|
|
try {
|
|
const config = await request.json()
|
|
console.log('🚨 EMERGENCY: Automation start request received')
|
|
|
|
const result = await emergencyAutomation.start(config)
|
|
|
|
return Response.json(result)
|
|
} catch (error) {
|
|
console.error('Emergency start failed:', error)
|
|
return Response.json({
|
|
success: false,
|
|
message: 'Emergency start failed: ' + error.message
|
|
}, { status: 500 })
|
|
}
|
|
}
|