Merge branch 'develop' into feature/Database-Connector
This commit is contained in:
commit
01f12c4e15
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue