Commit 08ac1d04 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[ERGO] Sending email at the end of phylo

parent 73de7b07
...@@ -16,6 +16,7 @@ Portability : POSIX ...@@ -16,6 +16,7 @@ Portability : POSIX
module Gargantext.API.Node.Update module Gargantext.API.Node.Update
where where
import Gargantext.Core.Types.Individu (User(..))
import Control.Lens (view) import Control.Lens (view)
import Data.Aeson import Data.Aeson
import Data.Maybe (Maybe(..), fromMaybe) import Data.Maybe (Maybe(..), fromMaybe)
...@@ -34,6 +35,7 @@ import Gargantext.Core.Viz.Graph.Tools (PartitionMethod(..), BridgenessMethod(.. ...@@ -34,6 +35,7 @@ import Gargantext.Core.Viz.Graph.Tools (PartitionMethod(..), BridgenessMethod(..
import Gargantext.Core.Viz.Graph.Types (Strength) import Gargantext.Core.Viz.Graph.Types (Strength)
import Gargantext.Core.Viz.Phylo (PhyloSubConfigAPI(..), subConfigAPI2config) import Gargantext.Core.Viz.Phylo (PhyloSubConfigAPI(..), subConfigAPI2config)
import Gargantext.Core.Viz.Phylo.API.Tools (flowPhyloAPI) import Gargantext.Core.Viz.Phylo.API.Tools (flowPhyloAPI)
import Gargantext.Database.Action.Mail (sendMail)
import Gargantext.Database.Action.Flow.Pairing (pairing) import Gargantext.Database.Action.Flow.Pairing (pairing)
import Gargantext.Database.Action.Flow.Types (FlowCmdM) import Gargantext.Database.Action.Flow.Types (FlowCmdM)
import Gargantext.Database.Action.Metrics (updateNgramsOccurrences, updateContextScore) import Gargantext.Database.Action.Metrics (updateNgramsOccurrences, updateContextScore)
...@@ -153,7 +155,7 @@ updateNode _uId lId (UpdateNodeParamsList _mode) jobHandle = do ...@@ -153,7 +155,7 @@ updateNode _uId lId (UpdateNodeParamsList _mode) jobHandle = do
markComplete jobHandle markComplete jobHandle
updateNode _userId phyloId (UpdateNodePhylo config) jobHandle = do updateNode userId phyloId (UpdateNodePhylo config) jobHandle = do
markStarted 3 jobHandle markStarted 3 jobHandle
corpusId' <- view node_parent_id <$> getNode phyloId corpusId' <- view node_parent_id <$> getNode phyloId
markProgress 1 jobHandle markProgress 1 jobHandle
...@@ -171,6 +173,7 @@ updateNode _userId phyloId (UpdateNodePhylo config) jobHandle = do ...@@ -171,6 +173,7 @@ updateNode _userId phyloId (UpdateNodePhylo config) jobHandle = do
} }
-} -}
_ <- updateHyperdata phyloId (HyperdataPhylo Nothing (Just phy)) _ <- updateHyperdata phyloId (HyperdataPhylo Nothing (Just phy))
sendMail (UserDBId userId)
markComplete jobHandle markComplete jobHandle
updateNode _uId tId (UpdateNodeParamsTexts _mode) jobHandle = do updateNode _uId tId (UpdateNodeParamsTexts _mode) jobHandle = do
......
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