[英]Hubot Heroku route message on startup
I have deployed a Hubot on Heroku to interact with Slack.我在 Heroku 上部署了一个 Hubot 来与 Slack 进行交互。 I am using a free dyno currently.
我目前正在使用免费的测功机。 After 30 minutes of inactivity, it goes to sleep.
闲置 30 分钟后,它会进入睡眠状态。 It wakes up when pinged from Slack.
从 Slack ping 时它会唤醒。 However, the first request is lost in the mix.
但是,第一个请求在混合中丢失了。 So the user has to type the command a second time.
所以用户必须再次输入命令。 Is there an easy way to make the bot wake up and still handle the first command?
有没有一种简单的方法可以让机器人唤醒并仍然处理第一个命令?
As stated in the documentation :如文档中所述:
To get around this, you can use the hubot-heroku-keepalive script, which will keep your free dyno alive for up to 18 hours/day.
为了解决这个问题,您可以使用hubot-heroku-keepalive脚本,它可以让您的免费dyno每天最多运行 18 小时。 If you never want Hubot to sleep, you will need to upgrade to Heroku's hobby plan.
如果您永远不想让 Hubot 睡觉,则需要升级到 Heroku 的业余爱好计划。
I use it so Hubot is at least online from 6 AM to midnight.我使用它,所以 Hubot 至少从早上 6 点到午夜在线。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.