Merge branch 'develop' into feature/Database-Connector

This commit is contained in:
Gustavo Henrique Miranda 2025-11-13 05:50:00 -03:00 committed by GitHub
commit 01f12c4e15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 1 deletions

View File

@ -23,7 +23,7 @@ public class MediaManagerApplication {
databaseManager = new DatabaseManager(config); databaseManager = new DatabaseManager(config);
databaseManager.init(); databaseManager.init();
// TODO: Initialize database connection
// TODO: Initialize IPC server with named pipes // TODO: Initialize IPC server with named pipes
// TODO: Start application services // TODO: Start application services
@ -35,8 +35,26 @@ public class MediaManagerApplication {
logger.info("Shutting down MediaManager Core..."); logger.info("Shutting down MediaManager Core...");
if (databaseManager != null) { if (databaseManager != null) {
databaseManager.close(); databaseManager.close();
// TODO: Cleanup resources
logger.info("MediaManager Core shutdown successfully");
try {
Thread.sleep(500);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} }
})); }));
logger.info("Application is running");
logger.info("Press Ctrl+C to exit");
Thread.currentThread().join();
} catch (InterruptedException e) {
logger.info("Application interrupted, initiating shutdown...");
Thread.currentThread().interrupt();
} catch (Exception e) { } catch (Exception e) {
logger.error("Failed to start MediaManager Core", e); logger.error("Failed to start MediaManager Core", e);