fix: disable auto migration to stabilize startup

This commit is contained in:
2026-03-14 21:56:15 -03:00
parent 424b75389f
commit 25eaaa8fcc

View File

@@ -15,7 +15,7 @@ const startServer = async () => {
app.listen(Number(PORT), '0.0.0.0', async () => { app.listen(Number(PORT), '0.0.0.0', async () => {
console.log(`🚀 Server running on port ${PORT} (0.0.0.0)`); console.log(`🚀 Server running on port ${PORT} (0.0.0.0)`);
if (mongoose.connection.readyState === 1) { if (mongoose.connection.readyState === 1) {
await migrateFilesToGridFS().catch(err => console.error('Migration failed:', err)); // await migrateFilesToGridFS().catch(err => console.error('Migration failed:', err));
// Agendar verificação de vencimento de estoque (a cada 24 horas) // Agendar verificação de vencimento de estoque (a cada 24 horas)
console.log('📅 Scheduling stock expiration check...'); console.log('📅 Scheduling stock expiration check...');