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
17 lines
385 B
JavaScript
17 lines
385 B
JavaScript
const TaskScheduler = require("./task-scheduler.js");
|
|
|
|
class TaskSchedulerSingleton {
|
|
constructor() {
|
|
if (!TaskSchedulerSingleton.instance) {
|
|
TaskSchedulerSingleton.instance = new TaskScheduler();
|
|
console.log("Task Scheduler Singleton created");
|
|
}
|
|
}
|
|
|
|
getInstance() {
|
|
return TaskSchedulerSingleton.instance;
|
|
}
|
|
}
|
|
|
|
module.exports = TaskSchedulerSingleton;
|