feat: automated backup and production monitoring

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-09 00:33:35 +00:00
co-authored by Claude Opus 4.6
parent d7d04eb2d7
commit 69601cce3a
4 changed files with 123 additions and 0 deletions
+10
View File
@@ -20,6 +20,8 @@ import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
import { cleanupOrphanedFights } from './engine/orchestrator.js'
import { recoverOrphanedPayments } from './engine/payments.js'
import { startDailyBackups } from './engine/backup.js'
import { startMemoryTracking } from './engine/analytics.js'
export const app = new Hono()
@@ -170,3 +172,11 @@ cleanupOrphanedFights().then(() => {
recoverOrphanedPayments().catch(err => {
console.error('[botfights] payment recovery error:', err)
})
// Start daily database backups (production only)
if (process.env.NODE_ENV === 'production') {
startDailyBackups()
}
// Start memory tracking
startMemoryTracking()