mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 13:23:35 +00:00
graceful shutdown
- confirmation dialog - shutdown node service
This commit is contained in:
+11
-1
@@ -106,7 +106,7 @@ export const startServer = (overrideConfig = null) => {
|
||||
};
|
||||
|
||||
// Start OSC server
|
||||
import { initiateOSC } from './controllers/OscController.js';
|
||||
import { initiateOSC, shutdownOSCServer } from './controllers/OscController.js';
|
||||
|
||||
export const startOSCServer = (overrideConfig = null) => {
|
||||
// Setup default port
|
||||
@@ -119,3 +119,13 @@ export const startOSCClient = (overrideConfig = null) => {
|
||||
const oscOutPort = overrideConfig?.port || config.osc.portOut;
|
||||
console.log('initialise OSC Client at port: ', oscOutPort);
|
||||
};
|
||||
|
||||
export const shutdown = () => {
|
||||
console.log('Node service shutdown');
|
||||
|
||||
// shutdown express server
|
||||
server.close();
|
||||
// shutdown OSC Server
|
||||
shutdownOSCServer();
|
||||
// shutdown OSC Client
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user