Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to restart a listener #56

Open
Polve opened this issue Oct 26, 2021 · 0 comments
Open

How to restart a listener #56

Polve opened this issue Oct 26, 2021 · 0 comments

Comments

@Polve
Copy link

Polve commented Oct 26, 2021

I run a long-term bot that listen to telegram events and needs to react to them.

The problem is that sometimes (usually after some days/weeks of correct work), for some reason not clear that I suspect is due to intermittent network failures, the bot stops being able to communicate with telegram so I need to stop the application and restart it.

This is clearly not practical because I'm not able to know if and when the bot "disconnects" without doing a manual test, so my question is:

  • is it possible to detect that for some reason the the UpdateProvider stopped working correctly?
  • how may I disconnect it and force a reconnection? Do I need to de-register the bot and re-register it? If so, is it possible to de-register a bot? I was unable to find something like this in the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant