Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
199
Issues
199
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
gargantext
haskell-gargantext
Commits
516ca84e
Commit
516ca84e
authored
Aug 26, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] bug MVar fixed
parent
5af7bd5d
Pipeline
#1733
passed with stage
in 37 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+2
-3
NodeStory.hs
src/Gargantext/Core/NodeStory.hs
+3
-3
No files found.
src/Gargantext/API/Ngrams.hs
View file @
516ca84e
...
@@ -183,7 +183,6 @@ saveRepo :: ( MonadReader env m, MonadBase IO m, HasNodeStorySaver env )
...
@@ -183,7 +183,6 @@ saveRepo :: ( MonadReader env m, MonadBase IO m, HasNodeStorySaver env )
saveRepo
=
liftBase
=<<
view
hasNodeStorySaver
saveRepo
=
liftBase
=<<
view
hasNodeStorySaver
listTypeConflictResolution
::
ListType
->
ListType
->
ListType
listTypeConflictResolution
::
ListType
->
ListType
->
ListType
listTypeConflictResolution
_
_
=
undefined
-- TODO Use Map User ListType
listTypeConflictResolution
_
_
=
undefined
-- TODO Use Map User ListType
...
@@ -308,7 +307,8 @@ commitStatePatch listId (Versioned p_version p) = do
...
@@ -308,7 +307,8 @@ commitStatePatch listId (Versioned p_version p) = do
assertValid $ transformable p q
assertValid $ transformable p q
assertValid $ applicable p' (r ^. r_state)
assertValid $ applicable p' (r ^. r_state)
-}
-}
printDebug
"a version"
(
a
^.
a_version
)
printDebug
"[commitStatePatch] a version"
(
a
^.
a_version
)
printDebug
"[commitStatePatch] a' version"
(
a'
^.
a_version
)
pure
(
ns
&
unNodeStory
.
at
listId
.~
(
Just
a'
)
pure
(
ns
&
unNodeStory
.
at
listId
.~
(
Just
a'
)
,
Versioned
(
a'
^.
a_version
)
q'
,
Versioned
(
a'
^.
a_version
)
q'
)
)
...
@@ -780,7 +780,6 @@ apiNgramsTableDoc dId = getTableNgramsDoc dId
...
@@ -780,7 +780,6 @@ apiNgramsTableDoc dId = getTableNgramsDoc dId
:<|>
scoresRecomputeTableNgrams
dId
:<|>
scoresRecomputeTableNgrams
dId
:<|>
getTableNgramsVersion
dId
:<|>
getTableNgramsVersion
dId
:<|>
apiNgramsAsync
dId
:<|>
apiNgramsAsync
dId
-- > index all the corpus accordingly (TODO AD)
apiNgramsAsync
::
NodeId
->
GargServer
TableNgramsAsyncApi
apiNgramsAsync
::
NodeId
->
GargServer
TableNgramsAsyncApi
apiNgramsAsync
_dId
=
apiNgramsAsync
_dId
=
...
...
src/Gargantext/Core/NodeStory.hs
View file @
516ca84e
...
@@ -18,7 +18,7 @@ module Gargantext.Core.NodeStory where
...
@@ -18,7 +18,7 @@ module Gargantext.Core.NodeStory where
-- import Debug.Trace (traceShow)
-- import Debug.Trace (traceShow)
import
Codec.Serialise
(
serialise
,
deserialise
)
import
Codec.Serialise
(
serialise
,
deserialise
)
import
Codec.Serialise.Class
import
Codec.Serialise.Class
import
Control.Concurrent
(
MVar
(),
withMVar
,
newMVar
)
import
Control.Concurrent
(
MVar
(),
withMVar
,
newMVar
,
modifyMVar_
)
import
Control.Debounce
(
mkDebounce
,
defaultDebounceSettings
,
debounceFreq
,
debounceAction
)
import
Control.Debounce
(
mkDebounce
,
defaultDebounceSettings
,
debounceFreq
,
debounceAction
)
import
Control.Lens
(
makeLenses
,
Getter
,
(
^.
))
import
Control.Lens
(
makeLenses
,
Getter
,
(
^.
))
import
Control.Monad.Except
import
Control.Monad.Except
...
@@ -98,8 +98,8 @@ nodeStoryVar :: NodeStoryDir
...
@@ -98,8 +98,8 @@ nodeStoryVar :: NodeStoryDir
->
IO
(
MVar
NodeListStory
)
->
IO
(
MVar
NodeListStory
)
nodeStoryVar
nsd
Nothing
ni
=
nodeStoryInc
nsd
Nothing
ni
>>=
newMVar
nodeStoryVar
nsd
Nothing
ni
=
nodeStoryInc
nsd
Nothing
ni
>>=
newMVar
nodeStoryVar
nsd
(
Just
mv
)
ni
=
do
nodeStoryVar
nsd
(
Just
mv
)
ni
=
do
mv'
<-
withMVar
mv
pure
_
<-
modifyMVar_
mv
$
\
mv'
->
(
nodeStoryInc
nsd
(
Just
mv'
)
ni
)
nodeStoryInc
nsd
(
Just
mv'
)
ni
>>=
newMVar
pure
mv
nodeStoryInc
::
NodeStoryDir
->
Maybe
NodeListStory
->
NodeId
->
IO
NodeListStory
nodeStoryInc
::
NodeStoryDir
->
Maybe
NodeListStory
->
NodeId
->
IO
NodeListStory
...
...
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