Commit 2274aa68 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] removing cron jobs

parent 9ab9897b
...@@ -5,7 +5,7 @@ cabal-version: 1.12 ...@@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
name: gargantext name: gargantext
version: 0.0.6.9.9.5.8 version: 0.0.6.9.9.5.8
synopsis: Search, map, share synopsis: Search, map, share
description: Please see README.md description: Please see README.md
category: Data category: Data
......
...@@ -34,7 +34,7 @@ module Gargantext.API ...@@ -34,7 +34,7 @@ module Gargantext.API
where where
import Control.Concurrent import Control.Concurrent
import Control.Exception (catch, finally, SomeException, displayException, IOException) import Control.Exception (catch, finally, SomeException{-, displayException, IOException-})
import Control.Lens import Control.Lens
import Control.Monad.Except import Control.Monad.Except
import Control.Monad.Reader (runReaderT) import Control.Monad.Reader (runReaderT)
...@@ -56,8 +56,8 @@ import Gargantext.API.Ngrams (saveNodeStoryImmediate) ...@@ -56,8 +56,8 @@ import Gargantext.API.Ngrams (saveNodeStoryImmediate)
import Gargantext.API.Routes import Gargantext.API.Routes
import Gargantext.API.Server (server) import Gargantext.API.Server (server)
import Gargantext.Core.NodeStory import Gargantext.Core.NodeStory
import Gargantext.Database.Prelude (Cmd) -- import Gargantext.Database.Prelude (Cmd)
import Gargantext.Database.Action.Metrics.NgramsByContext (refreshNgramsMaterialized) -- import Gargantext.Database.Action.Metrics.NgramsByContext (refreshNgramsMaterialized)
import Gargantext.Prelude hiding (putStrLn) import Gargantext.Prelude hiding (putStrLn)
import Network.HTTP.Types hiding (Query) import Network.HTTP.Types hiding (Query)
import Network.Wai import Network.Wai
...@@ -119,13 +119,14 @@ startGargantextMock port = do ...@@ -119,13 +119,14 @@ startGargantextMock port = do
-- | Schedules all sorts of useful periodic actions to be run while -- | Schedules all sorts of useful periodic actions to be run while
-- the server is alive accepting requests. -- the server is alive accepting requests.
schedulePeriodicActions :: DB.CmdCommon env => env -> IO [ThreadId] schedulePeriodicActions :: DB.CmdCommon env => env -> IO [ThreadId]
schedulePeriodicActions env = schedulePeriodicActions _env =
-- Add your scheduled actions here. -- Add your scheduled actions here.
let actions = [ let actions = [
refreshDBViews -- refreshDBViews
] ]
in foldlM (\ !acc action -> (`mappend` acc) <$> Cron.execSchedule action) [] actions in foldlM (\ !acc action -> (`mappend` acc) <$> Cron.execSchedule action) [] actions
{-
where where
refreshDBViews :: Cron.Schedule () refreshDBViews :: Cron.Schedule ()
...@@ -138,6 +139,7 @@ schedulePeriodicActions env = ...@@ -138,6 +139,7 @@ schedulePeriodicActions env =
_ <- liftIO $ putStrLn $ pack "Refresh Index Database done" _ <- liftIO $ putStrLn $ pack "Refresh Index Database done"
pure () pure ()
Cron.addJob doRefresh "* 2 * * *" Cron.addJob doRefresh "* 2 * * *"
-}
---------------------------------------------------------------------- ----------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment