Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
6d814c37
Commit
6d814c37
authored
Apr 02, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] more graph async work
parent
e3090ae8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
API.hs
src/Gargantext/Viz/Graph/API.hs
+6
-6
No files found.
src/Gargantext/Viz/Graph/API.hs
View file @
6d814c37
...
@@ -104,11 +104,11 @@ getGraph uId nId = do
...
@@ -104,11 +104,11 @@ getGraph uId nId = do
g
<-
case
graph
of
g
<-
case
graph
of
Nothing
->
do
Nothing
->
do
graph'
<-
computeGraph
cId
NgramsTerms
repo
graph'
<-
computeGraph
cId
NgramsTerms
repo
_
<-
insertGraph
cId
uId'
(
HyperdataGraph
$
Just
graph'
)
_
<-
insertGraph
cId
uId'
(
HyperdataGraph
$
Just
graph'
)
pure
graph'
pure
$
trace
"Graph empty, computing"
$
graph'
Just
graph'
->
pure
graph'
Just
graph'
->
pure
$
trace
"Graph exists, returning"
$
graph'
-- Just graph' -> if listVersion == Just v
-- Just graph' -> if listVersion == Just v
-- then pure graph'
-- then pure graph'
...
@@ -147,14 +147,14 @@ recomputeGraph uId nId = do
...
@@ -147,14 +147,14 @@ recomputeGraph uId nId = do
Nothing
->
do
Nothing
->
do
graph'
<-
computeGraph
cId
NgramsTerms
repo
graph'
<-
computeGraph
cId
NgramsTerms
repo
_
<-
insertGraph
cId
uId'
(
HyperdataGraph
$
Just
graph'
)
_
<-
insertGraph
cId
uId'
(
HyperdataGraph
$
Just
graph'
)
pure
graph'
pure
$
trace
"[recomputeGraph] Graph empty, computing"
$
graph'
Just
graph'
->
if
listVersion
==
Just
v
Just
graph'
->
if
listVersion
==
Just
v
then
pure
graph'
then
pure
graph'
else
do
else
do
graph''
<-
computeGraph
cId
NgramsTerms
repo
graph''
<-
computeGraph
cId
NgramsTerms
repo
_
<-
updateHyperdata
nId
(
HyperdataGraph
$
Just
graph''
)
_
<-
updateHyperdata
nId
(
HyperdataGraph
$
Just
graph''
)
pure
graph''
pure
$
trace
"[recomputeGraph] Graph exists, recomputing"
$
graph''
newGraph
<-
liftIO
newEmptyMVar
newGraph
<-
liftIO
newEmptyMVar
_
<-
liftIO
$
forkIO
$
putMVar
newGraph
g
_
<-
liftIO
$
forkIO
$
putMVar
newGraph
g
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment