fix windows build
This commit is contained in:
parent
2ed728e7e6
commit
30a474b309
1 changed files with 6 additions and 0 deletions
|
@ -194,8 +194,13 @@ dailyCheck urlrenderer = do
|
||||||
|
|
||||||
hourlyCheck :: Assistant ()
|
hourlyCheck :: Assistant ()
|
||||||
hourlyCheck = do
|
hourlyCheck = do
|
||||||
|
#ifndef mingw32_HOST_OS
|
||||||
checkLogSize 0
|
checkLogSize 0
|
||||||
|
#else
|
||||||
|
noop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef mingw32_HOST_OS
|
||||||
{- Rotate logs until log file size is < 1 mb. -}
|
{- Rotate logs until log file size is < 1 mb. -}
|
||||||
checkLogSize :: Int -> Assistant ()
|
checkLogSize :: Int -> Assistant ()
|
||||||
checkLogSize n = do
|
checkLogSize n = do
|
||||||
|
@ -209,6 +214,7 @@ checkLogSize n = do
|
||||||
checkLogSize $ n + 1
|
checkLogSize $ n + 1
|
||||||
where
|
where
|
||||||
filesize f = fromIntegral . fileSize <$> liftIO (getFileStatus f)
|
filesize f = fromIntegral . fileSize <$> liftIO (getFileStatus f)
|
||||||
|
#endif
|
||||||
|
|
||||||
oneMegabyte :: Int
|
oneMegabyte :: Int
|
||||||
oneMegabyte = 1000000
|
oneMegabyte = 1000000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue