Commit c3ec0c00 by softwhiskey8

добавил закрытие процесса отправки сообщений в тг (тест)

1 parent a3daa909
Showing with 11 additions and 3 deletions
......@@ -139,6 +139,13 @@ node tg
{
set $channel_type = "Telegram";
external sendTelegramChannel($channel_type, ""); //отправка уведомления в канал
var message = {
webinar: "Как продавать на маркетплейсах в 2022",
date: "11 июля",
promocode: "PROMO-CODE"
};
external sendTelegram(); //отправка личного сообщения
}
}
......
......@@ -152,8 +152,8 @@ async function main() {
//let cmd = String.raw`cd E:/work/projects2/telegram-channel-sender/
//dotnet telegram-channel-sender.dll 3 79112349232 ${args['channel_type']}`;
var cmd = `cd /servers/constructor/htdocs/api/ && php telegram-channel-sender.php ${events_owner} ${process.argv[2]} ${args['channel_type']}`;
exec(cmd, (error, stdout, stderr) => {
if (error) {
var tgProc = exec(cmd);//, (error, stdout, stderr) => {
/*if (error) {
console.error(`error: ${error.message}`);
return;
}
......@@ -164,7 +164,8 @@ async function main() {
}
console.log(`stdout:\n${stdout}`);
});
});*/
process.kill(tgProc.pid);
});
await app.start();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!