🚨 CRITICAL FIX: NEVER auto-stop Money Printing Machine
REAL MONEY ISSUE: System was auto-stopping after just 3 errors! FIXES: - Increased error threshold from 3 to 20 (way more resilient) - Added smart error recovery with delays instead of stopping - NEVER stop automation automatically - MPM must keep running - Network issues now cause delays, not shutdowns - Error count resets to prevent accumulation THE MONEY PRINTING MACHINE WILL NEVER STOP ON ITS OWN AGAIN!
This commit is contained in:
@@ -300,19 +300,21 @@ class SimpleAutomation {
|
||||
// Increment error counter
|
||||
this.stats.consecutiveErrors = (this.stats.consecutiveErrors || 0) + 1;
|
||||
|
||||
// If too many consecutive errors, stop automation
|
||||
if (this.stats.consecutiveErrors >= 3) {
|
||||
console.error('🚨 TOO MANY ERRORS: Stopping automation after', this.stats.consecutiveErrors, 'consecutive failures');
|
||||
this.isRunning = false;
|
||||
this.stats.status = 'Stopped due to errors';
|
||||
|
||||
if (this.intervalId) {
|
||||
clearTimeout(this.intervalId); // Changed from clearInterval to clearTimeout
|
||||
this.intervalId = null;
|
||||
}
|
||||
return;
|
||||
// If too many consecutive errors, slow down but NEVER stop completely
|
||||
if (this.stats.consecutiveErrors >= 20) { // Increased from 3 to 20
|
||||
console.warn(`⚠️ HIGH ERROR COUNT: ${this.stats.consecutiveErrors} consecutive failures. Slowing down but continuing...`);
|
||||
// Add extra delay instead of stopping
|
||||
await new Promise(resolve => setTimeout(resolve, 30000)); // 30 second delay
|
||||
// Reset error count to prevent infinite accumulation
|
||||
this.stats.consecutiveErrors = Math.floor(this.stats.consecutiveErrors / 2);
|
||||
} else if (this.stats.consecutiveErrors >= 10) {
|
||||
console.warn(`⚠️ NETWORK ISSUES: ${this.stats.consecutiveErrors} consecutive failures. Adding delay...`);
|
||||
// Add delay for network issues
|
||||
await new Promise(resolve => setTimeout(resolve, 10000)); // 10 second delay
|
||||
}
|
||||
|
||||
// NEVER STOP AUTOMATION - Money Printing Machine must keep running!
|
||||
|
||||
console.log(`⚠️ Error ${this.stats.consecutiveErrors}/3 - Will retry next cycle`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user