Improve video metadata synchronization with automatic database updates
Implement periodic synchronization for video metadata to ensure the database remains up-to-date with Bunny.net, including initial migration and recurring checks every 5 minutes. Replit-Commit-Author: Agent Replit-Commit-Session-Id: d7424866-83d1-4486-a212-ac12b4c7becf Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/d7424866-83d1-4486-a212-ac12b4c7becf/yjIG1wi
This commit is contained in:
+4
-4
@@ -41,11 +41,11 @@ app.use((req, res, next) => {
|
||||
// Initialize video sync service for automatic Bunny.net updates
|
||||
await videoSyncService.initialize();
|
||||
|
||||
// Run video metadata migration on startup
|
||||
// Initialize video metadata migrator with periodic sync
|
||||
const { videoMigrator } = await import('./videoMigrator');
|
||||
console.log("🔄 Starting video metadata migration to PostgreSQL...");
|
||||
videoMigrator.migrateAllVideoMetadata().catch(error => {
|
||||
console.error("❌ Video migration failed:", error);
|
||||
console.log("🔄 Initializing video metadata system...");
|
||||
videoMigrator.initialize().catch(error => {
|
||||
console.error("❌ Video metadata initialization failed:", error);
|
||||
});
|
||||
|
||||
const server = await registerRoutes(app);
|
||||
|
||||
Reference in New Issue
Block a user