首頁  >  問答  >  主體

ruby - 为什么在rails项目中touch /tmp/restart.txt 这个文件就可以达到更新服务的目的?

一般在rails+nginx+passenger在修改部分代码后,通常touch 一下/tmp/restart.txt就可以更新项目,这个和nginx -s reload 的作用是一样的,我想问一下.这个做的原理是什么呢?

怪我咯怪我咯2713 天前635

全部回覆(1)我來回復

  • PHPz

    PHPz2017-04-21 10:59:22

    這個是passneger官方文件的解釋
    http://www.modrails.com/documentation...

    Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted.

    回覆
    0
  • 取消回覆