Revise previous fix (#799) to yesod devel timeout
This commit is contained in:
parent
a9f526bb39
commit
20dfec4d88
@ -388,7 +388,7 @@ watchForChanges filesModified hsSourceDirs extraFiles list t = do
|
|||||||
Map.differenceWith compareTimes newList list `Map.union`
|
Map.differenceWith compareTimes newList list `Map.union`
|
||||||
Map.differenceWith compareTimes list newList
|
Map.differenceWith compareTimes list newList
|
||||||
return (haskellFileChanged, newList)
|
return (haskellFileChanged, newList)
|
||||||
else timeout (10000000*t) (takeMVar filesModified) >>
|
else timeout (1000000*t) (takeMVar filesModified) >>
|
||||||
watchForChanges filesModified hsSourceDirs extraFiles list t
|
watchForChanges filesModified hsSourceDirs extraFiles list t
|
||||||
where
|
where
|
||||||
compareTimes x y
|
compareTimes x y
|
||||||
|
|||||||
@ -152,6 +152,9 @@ optParser = Options
|
|||||||
keterOptions :: Parser Command
|
keterOptions :: Parser Command
|
||||||
keterOptions = Keter <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" )
|
keterOptions = Keter <$> switch ( long "nobuild" <> short 'n' <> help "Skip rebuilding" )
|
||||||
|
|
||||||
|
defaultRescan :: Int
|
||||||
|
defaultRescan = 10
|
||||||
|
|
||||||
develOptions :: Parser Command
|
develOptions :: Parser Command
|
||||||
develOptions = Devel <$> switch ( long "disable-api" <> short 'd'
|
develOptions = Devel <$> switch ( long "disable-api" <> short 'd'
|
||||||
<> help "Disable fast GHC API rebuilding")
|
<> help "Disable fast GHC API rebuilding")
|
||||||
@ -159,8 +162,10 @@ develOptions = Devel <$> switch ( long "disable-api" <> short 'd'
|
|||||||
<> help "Run COMMAND after rebuild succeeds")
|
<> help "Run COMMAND after rebuild succeeds")
|
||||||
<*> optStr ( long "failure-hook" <> short 'f' <> metavar "COMMAND"
|
<*> optStr ( long "failure-hook" <> short 'f' <> metavar "COMMAND"
|
||||||
<> help "Run COMMAND when rebuild fails")
|
<> help "Run COMMAND when rebuild fails")
|
||||||
<*> option ( long "event-timeout" <> short 't' <> value 1 <> metavar "N"
|
<*> option ( long "event-timeout" <> short 't' <> value defaultRescan <> metavar "N"
|
||||||
<> help "Force rescan of files every N seconds" )
|
<> help ("Force rescan of files every N seconds (default "
|
||||||
|
++ show defaultRescan
|
||||||
|
++ ", use -1 to rely on FSNotify alone)") )
|
||||||
<*> optStr ( long "builddir" <> short 'b'
|
<*> optStr ( long "builddir" <> short 'b'
|
||||||
<> help "Set custom cabal build directory, default `dist'")
|
<> help "Set custom cabal build directory, default `dist'")
|
||||||
<*> many ( strOption ( long "ignore" <> short 'i' <> metavar "DIR"
|
<*> many ( strOption ( long "ignore" <> short 'i' <> metavar "DIR"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user