create function sendNotification

This commit is contained in:
joseph le 2023-09-27 16:32:29 +07:00
parent 7d5a6a0c22
commit 2936bbc562
1 changed files with 14 additions and 5 deletions

View File

@ -60,11 +60,20 @@ const sendNotification = async () => {
if (error) {
return;
}
console.log("RESTART: ", stdout);
console.log("RESTART: ", stdout)
let content = "Server die! Restart ...";
let params = {
type: "stream",
to: "Result test - auto.nswteam.net",
topic: "test",
content: content,
};
client.messages.send(params);
});
}else{
console.log("server good")
} else {
console.log("server good");
}
} else {
console.log({ auto1: auto1, auto2: auto2, log: log });
@ -87,8 +96,8 @@ const sendNotification = async () => {
"|";
let params = {
type: "stream",
to: "Result test - auto.nswteam.net",
topic: "test",
to: "System Logs",
topic: "stream events",
content: content,
};