Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Alexander
/
alex-hunter-sales-dev
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c3ec0c00
authored
Oct 31, 2022
by
softwhiskey8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
добавил закрытие процесса отправки сообщений в тг (тест)
1 parent
a3daa909
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
app/main.dsl
index.js
app/main.dsl
View file @
c3ec0c0
...
...
@@ -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(); //отправка личного сообщения
}
}
...
...
index.js
View file @
c3ec0c0
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment