Commit c0957869 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] sending email at the end of phylo commented

parent 17ba8846
Pipeline #4353 failed with stages
in 126 minutes and 34 seconds
...@@ -16,7 +16,7 @@ Portability : POSIX ...@@ -16,7 +16,7 @@ Portability : POSIX
module Gargantext.API.Node.Update module Gargantext.API.Node.Update
where where
import Gargantext.Core.Types.Individu (User(..)) --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)
...@@ -35,7 +35,7 @@ import Gargantext.Core.Viz.Graph.Tools (PartitionMethod(..), BridgenessMethod(.. ...@@ -35,7 +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.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)
...@@ -155,7 +155,7 @@ updateNode _uId lId (UpdateNodeParamsList _mode) jobHandle = do ...@@ -155,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
...@@ -173,7 +173,9 @@ updateNode userId phyloId (UpdateNodePhylo config) jobHandle = do ...@@ -173,7 +173,9 @@ updateNode userId phyloId (UpdateNodePhylo config) jobHandle = do
} }
-} -}
_ <- updateHyperdata phyloId (HyperdataPhylo Nothing (Just phy)) _ <- updateHyperdata phyloId (HyperdataPhylo Nothing (Just phy))
sendMail (UserDBId userId)
-- TODO: catch the error of sendMail if userId is not found, then debug
-- 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