aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-04-19 13:33:40 +0200
committerJoris Guyonvarch2015-04-19 13:33:46 +0200
commit5709f552ddb71c082db9a202f76215cdd3a6a3ec (patch)
tree4ee3b04669d547f518e7ca819b46bd070b5045d8 /src
parentd183a8bf367135418d298fec8e060a3adb966e86 (diff)
Removing waitInMinutes from the configuration
Diffstat (limited to 'src')
-rw-r--r--src/AdListener.hs1
-rw-r--r--src/Config.hs5
-rw-r--r--src/Model/Config.hs1
3 files changed, 1 insertions, 6 deletions
diff --git a/src/AdListener.hs b/src/AdListener.hs
index eee2de4..a52e188 100644
--- a/src/AdListener.hs
+++ b/src/AdListener.hs
@@ -8,6 +8,7 @@ import Data.List (intersperse)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
+import Data.Time.Clock (getCurrentTime, diffUTCTime, UTCTime)
import Control.Concurrent (threadDelay)
diff --git a/src/Config.hs b/src/Config.hs
index e4b2bc6..39ff185 100644
--- a/src/Config.hs
+++ b/src/Config.hs
@@ -36,7 +36,6 @@ configUsage =
, " - url (required)"
, " - mailTo (optional)"
, " - properties (optional)"
- , " - waitInMinutes (optional, default to 1)"
, ""
, " Example:"
, ""
@@ -50,9 +49,6 @@ configUsage =
, ""
, " # The properties field is an optional list"
, " # properties = cp, city, surface, ges"
- , ""
- , " # The waitInMinutes field is an optional integer, default to 1"
- , " # waitInMinutes = 60"
]
configPath :: FilePath
@@ -86,7 +82,6 @@ configFromMap map = do
{ url = url
, mailTo = fieldValues "mailTo" map
, properties = fieldValues "properties" map
- , waitInMinutes = fromMaybe 1 $ M.lookup "waitInMinutes" map >>= fmap fst . eitherToMaybe . decimal
}
return config
diff --git a/src/Model/Config.hs b/src/Model/Config.hs
index 8fb05b9..42b390e 100644
--- a/src/Model/Config.hs
+++ b/src/Model/Config.hs
@@ -10,5 +10,4 @@ data Config = Config
{ url :: URL
, mailTo :: [Text]
, properties :: [Text]
- , waitInMinutes :: Int
} deriving (Eq, Read, Show)