diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-26 12:42:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-26 12:42:58 -0400 |
commit | 956694b88fff7bc151bad6196ed429e0db7b23cb (patch) | |
tree | 07237216bb2c9854d19a3664413b1311f472ad27 /Command/Watch.hs | |
parent | fdec6d27c4d32b9d641d17336b6be4a91c1d3fc4 (diff) |
assistant: When autostarted, wait 5 seconds before running the startup scan, to avoid contending with the user's desktop login process.
Diffstat (limited to 'Command/Watch.hs')
-rw-r--r-- | Command/Watch.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/Watch.hs b/Command/Watch.hs index c5fd1a8cd..0b34b0f84 100644 --- a/Command/Watch.hs +++ b/Command/Watch.hs @@ -11,6 +11,7 @@ import Common.Annex import Assistant import Command import Option +import Utility.HumanTime def :: [Command] def = [notBareRepo $ withOptions [foregroundOption, stopOption] $ @@ -19,7 +20,7 @@ def = [notBareRepo $ withOptions [foregroundOption, stopOption] $ seek :: [CommandSeek] seek = [withFlag stopOption $ \stopdaemon -> withFlag foregroundOption $ \foreground -> - withNothing $ start False foreground stopdaemon] + withNothing $ start False foreground stopdaemon Nothing] foregroundOption :: Option foregroundOption = Option.flag [] "foreground" "do not daemonize" @@ -27,9 +28,9 @@ foregroundOption = Option.flag [] "foreground" "do not daemonize" stopOption :: Option stopOption = Option.flag [] "stop" "stop daemon" -start :: Bool -> Bool -> Bool -> CommandStart -start assistant foreground stopdaemon = do +start :: Bool -> Bool -> Bool -> Maybe Duration -> CommandStart +start assistant foreground stopdaemon startdelay = do if stopdaemon then stopDaemon - else startDaemon assistant foreground Nothing Nothing -- does not return + else startDaemon assistant foreground startdelay Nothing Nothing -- does not return stop |