首页 > 解决方案 > 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.

标签: ruby-on-railsruby

解决方案


推荐阅读