diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-09-01 02:06:51 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-09-01 02:12:13 +0000 |
commit | 0208f3bfd132d58c31d5db06db6378277fa71c7b (patch) | |
tree | 8ed0c5b21b7bc12f7f7f891a6454a88014bdc29b /lib/dtas/state_file.rb | |
parent | 53b984b1e054a0804884ee83e2debe5baea8a222 (diff) | |
download | dtas-0208f3bfd132d58c31d5db06db6378277fa71c7b.tar.gz |
This helps in case dtas-player is hit with SIGKILL or the system crashes. This does not fsync(2) as that could introduce delays on slow filesystems. Users should open the file manually and fsync themselves if they need to.
Diffstat (limited to 'lib/dtas/state_file.rb')
-rw-r--r-- | lib/dtas/state_file.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/dtas/state_file.rb b/lib/dtas/state_file.rb index c009797..0ba876f 100644 --- a/lib/dtas/state_file.rb +++ b/lib/dtas/state_file.rb @@ -3,6 +3,8 @@ require 'yaml' require 'tempfile' class DTAS::StateFile # :nodoc: + attr_reader :path + def initialize(path, do_fsync = false) @path = path @do_fsync = do_fsync |