-
Notifications
You must be signed in to change notification settings - Fork 474
Sample Bot ready to be hosted on Heroku #96
base: master
Are you sure you want to change the base?
Conversation
Thank you. I appreciate it. But I'd like to focus on 8.2 before looking at this. I will get back to you after 8.2 is done. As for GAE, some people have reported problem getting telepot to run there (issue #55). Do you see this as a problem? |
@vavdoshka Have you had any luck launching a bot on Heroku using aiohttp with Gunicorn instead of flask and Gunicorn? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need for delay between setWebhooks
UPDATE_QUEUE.put(request.data) # pass update to bot | ||
return 'OK' | ||
|
||
BOT.setWebhook() # unset if was set previously |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of Sept 2016, Telegram seems to limit the rate of webhook setting to about 1/sec, raising a TooManyRequestsError
(code 429) if it goes faster than that. Inserting a 1 or 2 second sleep between calls of setWebhook()
fixes this.
Or just remove the first setWebhook()
altogether, since there's no need to unset it before setting a new one.
Just a little question, |
Hey, Great Bot API Actually!
And It really needs one of those boilerplate set-ups on cloud hostings, does it?
I can add one for GAE as well, if you find it useful.