plugin-contrib icon indicating copy to clipboard operation
plugin-contrib copied to clipboard

[feature request] Heartbeat health check

Open suntong opened this issue 5 years ago • 1 comments

It'd be great to have a heartbeat health check plugin -- 验证heartbeat

就是如何验证自己的代码是否收不到更新消息了

前几天遇到过一次,不知道为什么,一条新消息都收不到了,可事实上是错过了好多

[Huan (李卓桓)]:

看来应该发布一个插件做这个验证 heartbeat 了呢 你去发一个 issue 提一个 feature request 吧,我可以把之前的代码封装一下

suntong avatar Nov 07 '20 03:11 suntong

There's a great method that design by me months ago, to solve this problem:

  1. Make sure your bot subscribe to the official account chatieio on WeChat
  2. Send a ding message to chatieio, which you can expect a dong response from the Official Account
  3. If you did not receive dong for more than 60 seconds, then your bot has a high probability that can not receive WeChat message anymore.

I have implemented this design in our HA Wechaty.

In order to use HAWechaty, we need to follow WeChat Official Account "chatieio" first.

See https://github.com/wechaty/HAWechaty/issues/1

Todo:

  • [ ] make this code snip a plugin for our plugin-contrib.

huan avatar Nov 07 '20 03:11 huan