feat: automated backup and production monitoring
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d7d04eb2d7
commit
69601cce3a
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user