implement daemon status serialization to a file
Also afterLastDaemonRun, with 10 minute slop to handle majority of clock skew issues.
This commit is contained in:
parent
ccc5005245
commit
ff2414427b
3 changed files with 55 additions and 5 deletions
|
@ -154,10 +154,8 @@ onAddSymlink file filestatus dstatus = go =<< Backend.lookupFile file
|
|||
| scanComplete daemonstatus = addlink link
|
||||
| otherwise = case filestatus of
|
||||
Just s
|
||||
| safe (statusChangeTime s) -> noChange
|
||||
| not (afterLastDaemonRun (statusChangeTime s) daemonstatus) -> noChange
|
||||
_ -> addlink link
|
||||
where
|
||||
safe t = maybe True (> t) (lastRunning daemonstatus)
|
||||
|
||||
{- For speed, tries to reuse the existing blob for
|
||||
- the symlink target. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue