Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

Sample Bot ready to be hosted on Heroku #96

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vavdoshka
Copy link

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.

@nickoala
Copy link
Owner

nickoala commented Jun 7, 2016

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?

@arthurtyukayev
Copy link

@vavdoshka Have you had any luck launching a bot on Heroku using aiohttp with Gunicorn instead of flask and Gunicorn?

Copy link
Contributor

@GaryBeez GaryBeez left a 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
Copy link
Contributor

@GaryBeez GaryBeez Sep 28, 2016

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.

leninmedeiros pushed a commit to leninmedeiros/telepot-heroku that referenced this pull request Oct 18, 2016
@galpressman
Copy link

Just a little question,
Assuming my current code uses polling instead of webhooks, is there a way to deploy it that way or do I have to convert it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants