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
197
Issues
197
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
f7f4c9cc
Unverified
Commit
f7f4c9cc
authored
Feb 18, 2019
by
Nicolas Pouillard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGRAMS-REPO] Repl now uses repo.json too. No lock yet.
parent
7460d319
Pipeline
#206
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Settings.hs
src/Gargantext/API/Settings.hs
+5
-5
No files found.
src/Gargantext/API/Settings.hs
View file @
f7f4c9cc
...
...
@@ -171,12 +171,12 @@ readRepo :: IO (MVar NgramsRepo)
readRepo
=
do
-- | Does file exist ? :: Bool
repoFile
<-
doesFileExist
repoSnapshot
-- | Is file not empty ? :: Bool
repoExists
<-
if
repoFile
then
(
>
0
)
<$>
getFileSize
repoSnapshot
else
pure
repoFil
e
else
pure
Fals
e
newMVar
=<<
if
repoExists
then
do
...
...
@@ -186,7 +186,7 @@ readRepo = do
copyFile
repoSnapshot
archive
pure
repo
else
pure
initMockRepo
pure
mempty
mkRepoSaver
::
MVar
NgramsRepo
->
IO
(
IO
()
)
mkRepoSaver
repo_var
=
do
...
...
@@ -241,7 +241,7 @@ newDevEnvWith :: FilePath -> IO DevEnv
newDevEnvWith
file
=
do
param
<-
databaseParameters
file
conn
<-
connect
param
repo_var
<-
newMVar
initMock
Repo
repo_var
<-
read
Repo
repo_saver
<-
mkRepoSaver
repo_var
pure
$
DevEnv
{
_dev_env_conn
=
conn
...
...
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