1
0
Fork 0
forked from svrjs/svrjs

Add "restart" command placeholder.

This commit is contained in:
Dorian Niemiec 2024-08-25 20:37:25 +02:00
parent 4a528120be
commit fca7fb78d6

View file

@ -963,7 +963,6 @@ if (process.serverConfig.secure) {
} }
} }
// TODO: restart commands
// Base commands // Base commands
let commands = { let commands = {
close: (args, log) => { close: (args, log) => {
@ -1093,6 +1092,10 @@ let commands = {
} }
} }
}, },
restart: (args, log) => {
if (cluster.isPrimary === undefined) log("This command is not supported on single-threaded " + name + ".");
else log("This command need to be run in " + name + " master.");
}
}; };
// Load commands from middleware // Load commands from middleware
@ -1579,15 +1582,6 @@ function start(init) {
} }
// TODO: implement clustering and commands // TODO: implement clustering and commands
/*
// SVR.JS commmands (only restart is there)
var commands = {
restart: function () {
if (cluster.isPrimary === undefined) serverconsole.climessage("This command is not supported on single-threaded " + name + ".");
else process.send("This command need to be run in " + name + " master.");
}
};
*/
if (init) { if (init) {
let workersToFork = 1; let workersToFork = 1;