搜尋

首頁  >  問答  >  主體

ruby - 為什麼在rails專案中touch /tmp/restart.txt 這個檔案就可以達到更新服務的目的?

一般在rails nginx passenger在修改部分代碼後,通常touch 一下/tmp/restart.txt就可以更新項目,這個和nginx -s reload 的作用是一樣的,我想問一下.這個做的原理是什麼呢?

怪我咯怪我咯2859 天前697

全部回覆(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
  • 取消回覆