1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-25 15:06:41 +07:00

#5 added healthcheck

This commit is contained in:
Fedor Katurov 2021-05-12 14:24:56 +07:00
parent 46d24cd9dd
commit dd3c281af9
6 changed files with 37 additions and 4 deletions

View file

@ -96,11 +96,22 @@ export class TelegramService {
});
};
stop = (signal: string) => {
/**
* Stops service
* @param signal
*/
public stop = (signal: string) => {
if (!this.isWebhookEnabled) {
return;
}
this.bot.stop(signal);
};
/**
* Performs healthcheck for telegram
*/
public healthcheck = async () => {
await this.bot.telegram.getMe();
};
}