Custom condition for watching a restart file

380 views
Skip to first unread message

Nathan Humbert

unread,
Sep 9, 2010, 12:20:22 PM9/9/10
to god.rb
http://gist.github.com/571095

This is a custom condition that returns true if the modification time
of the file is more recent than the start time of the process being
watched.

Usage:

restart.condition(:restart_file_touched) do |c|
c.interval = 5.seconds
c.restart_file = File.join(rails_root, 'tmp', 'restart.txt')
end

LacKac

unread,
Oct 14, 2010, 11:55:58 AM10/14/10
to god.rb
This is great. Exactly what I was looking for. Thanks!

Cheers,
LacKac
Reply all
Reply to author
Forward
0 new messages