ruby-on-rails - How can I automatically restart a thread Ruby on Rails
问题描述
I am building an information synchronizer, I use a thread so that when I start the server it is executed (I use RethinkDB to listen to the changes) but when a code error occurs the thread dies, I need that when it dies it comes back and starts.
I thought about watching the thread but I have not found a solution.
In advance thank you very much for the help!
I have tried with the CRONO, but it is not an automatic solution since every so often it does the verification, the idea is that everything works in real time.
解决方案
推荐阅读
- node.js - 为链链接节点构建外部适配器,得到“语法错误:JSON 中位置 0 的意外标记?
- nginx - 使用 gRPC 和 HTTP 的 kubernetes 入口
- html - 我正在做一个投资组合项目,我想让图像响应
- java - 在 fxml 文件 JAVA 代码中使用控制器时出错
- php - 雄辩的 toArray 不适用于子查询
- python - 使用 pyspark 实现提升集成方法
- angular - Angular 11:不能使用查询参数
- python - 如何使用 Cron 或 Python 启动 xvfb 显示?
- excel - the select statement includes a reserved word or argument name that is misspelled or missing, or the punctuation is incorrect - VBA Excel
- php - 如何使用 Doctrine/Symfony 与 2 个数据库建立多对多关联