mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
task manager implementation to start/stop tasks WIP implemented socket client for internal communication between threads - needs more testing as connection string is hardcoded added loopback in ws server to pass through toast ws messages from threads - needs more testing fixed potential bug during config fetch function when syncing
18 lines
345 B
JavaScript
18 lines
345 B
JavaScript
class WebSocketServerSingleton {
|
|
constructor() {
|
|
if (!WebSocketServerSingleton.instance) {
|
|
WebSocketServerSingleton.instance = null;
|
|
}
|
|
}
|
|
|
|
setInstance(io) {
|
|
WebSocketServerSingleton.instance = io;
|
|
}
|
|
|
|
getInstance() {
|
|
return WebSocketServerSingleton.instance;
|
|
}
|
|
}
|
|
|
|
module.exports = new WebSocketServerSingleton();
|