fix: no longer update graphs and phylos on corpus update

parent f775d4a3
Pipeline #6785 failed with stages
...@@ -35,7 +35,7 @@ import Gargantext.Database.Action.Flow.Pairing (pairing) ...@@ -35,7 +35,7 @@ import Gargantext.Database.Action.Flow.Pairing (pairing)
import Gargantext.Database.Action.Metrics (updateNgramsOccurrences, updateContextScore) import Gargantext.Database.Action.Metrics (updateNgramsOccurrences, updateContextScore)
import Gargantext.Database.Admin.Types.Hyperdata.Phylo ( HyperdataPhylo(HyperdataPhylo) ) import Gargantext.Database.Admin.Types.Hyperdata.Phylo ( HyperdataPhylo(HyperdataPhylo) )
import Gargantext.Database.Admin.Types.Node ( NodeId, import Gargantext.Database.Admin.Types.Node ( NodeId,
NodeType(NodeCorpus, NodeAnnuaire, NodeTexts, NodeGraph, NodePhylo, NodeList) ) NodeType(NodeCorpus, NodeAnnuaire, NodeTexts, NodeList) )
import Gargantext.Database.Query.Table.Node (defaultList, getNode, getChildrenByType) import Gargantext.Database.Query.Table.Node (defaultList, getNode, getChildrenByType)
import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata) import Gargantext.Database.Query.Table.Node.UpdateOpaleye (updateHyperdata)
import Gargantext.Database.Schema.Node (node_parent_id) import Gargantext.Database.Schema.Node (node_parent_id)
...@@ -146,21 +146,15 @@ updateNode tId (UpdateNodeParamsTexts _mode) jobHandle = do ...@@ -146,21 +146,15 @@ updateNode tId (UpdateNodeParamsTexts _mode) jobHandle = do
markComplete jobHandle markComplete jobHandle
updateNode tId updateNode tId (UpdateNodeParamsCorpus methodTexts methodList) jobHandle = do
(UpdateNodeParamsCorpus methodGraph methodPhylo methodTexts methodList)
jobHandle = do
markStarted 3 jobHandle markStarted 3 jobHandle
markProgress 1 jobHandle markProgress 1 jobHandle
_ <- getNode tId _ <- getNode tId
childTexts <- getChildrenByType tId NodeTexts childTexts <- getChildrenByType tId NodeTexts
childGraphs <- getChildrenByType tId NodeGraph
childPhylos <- getChildrenByType tId NodePhylo
childNodeLists <- getChildrenByType tId NodeList childNodeLists <- getChildrenByType tId NodeList
mapM_ (\cId -> updateNode cId (UpdateNodeParamsTexts methodTexts) jobHandle) childTexts mapM_ (\cId -> updateNode cId (UpdateNodeParamsTexts methodTexts) jobHandle) childTexts
mapM_ (\cId -> updateNode cId (UpdateNodeParamsGraph methodGraph) jobHandle) childGraphs
mapM_ (\cId -> updateNode cId (UpdateNodePhylo methodPhylo) jobHandle) childPhylos
mapM_ (\cId -> updateNode cId (UpdateNodeParamsList methodList) jobHandle) childNodeLists mapM_ (\cId -> updateNode cId (UpdateNodeParamsList methodList) jobHandle) childNodeLists
markComplete jobHandle markComplete jobHandle
......
...@@ -21,9 +21,7 @@ data UpdateNodeParams = UpdateNodeParamsList { methodList :: !Method } ...@@ -21,9 +21,7 @@ data UpdateNodeParams = UpdateNodeParamsList { methodList :: !Method }
| UpdateNodeParamsTexts { methodTexts :: !Granularity } | UpdateNodeParamsTexts { methodTexts :: !Granularity }
| UpdateNodeParamsCorpus { methodGraph :: !UpdateNodeConfigGraph | UpdateNodeParamsCorpus { methodTexts :: !Granularity
, methodPhylo :: !PhyloSubConfigAPI
, methodTexts :: !Granularity
, methodList :: !Method } , methodList :: !Method }
| UpdateNodeParamsBoard { methodBoard :: !Charts } | UpdateNodeParamsBoard { methodBoard :: !Charts }
......
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