安排Heroku每10分钟左右重新启动测功机

安排Heroku每10分钟左右重新启动测功机

本文介绍了安排Heroku每10分钟左右重新启动测功机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Heroku上使用Node.js开发REST api,一个驱动程序给我带来了问题(我已经向驱动程序创建者报告过),但是基本上每隔半小时重新启动dynos似乎解决这个问题.我希望你们所有人都可以帮助我编写调度程序脚本或类似的方法,以每隔10分钟左右自动重新启动dyno,这是一个临时解决方案.

I am developing a REST api with Node.js on Heroku, and one the drivers is giving me problems (I reported that to the driver creator already), but basically a restart of the dynos every half an hour or so seems to fix this.I was hoping y'all could help me with writing a script for scheduler or something similar to restart the dynos automatically every 10 or so minutes as a temporary fix.

p.s.我检查了调度程序文档,但这没什么意义

p.s. I checked out the scheduler documentation, but it didn't make much sense

谢谢!

推荐答案

您可以通过执行以下操作来完成您要问的事情:

You can do what you're asking by doing the following:

提供Heroku Scheduler插件.

Provision the Heroku Scheduler addon.

进入Heroku Scheduler的Web UI,并告诉它每小时(或任何适合您的时间段)运行重新启动脚本.

Go into Heroku Scheduler's web UI, and tell it to run your restart script every hour (or whatever time period works for you).

这是完成此任务的最佳务实"方式.

This is the best 'pragmatic' way to accomplish this.

这篇关于安排Heroku每10分钟左右重新启动测功机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 23:59