Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
fa695c8e
Commit
fa695c8e
authored
Jan 19, 2016
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UWSGI config] only one thread.
parent
0dc81f90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
gargantext.ini
gargantext.ini
+2
-0
views.py
tests/ngramstable/views.py
+4
-9
No files found.
gargantext.ini
View file @
fa695c8e
...
...
@@ -31,6 +31,8 @@ processes = 10
# the socket (use the full path to be safe)
socket
=
/tmp/gargantext.sock
threads
=
1
# with appropriate permissions - *may* be needed
chmod-socket
=
666
...
...
tests/ngramstable/views.py
View file @
fa695c8e
...
...
@@ -104,6 +104,7 @@ def get_ngrams(request , project_id , corpus_id ):
}))
return
HttpResponse
(
html
)
session
.
remove
()
def
get_journals
(
request
,
project_id
,
corpus_id
):
...
...
@@ -146,6 +147,7 @@ def get_journals(request , project_id , corpus_id ):
}))
return
HttpResponse
(
html
)
session
.
remove
()
def
get_journals_json
(
request
,
project_id
,
corpus_id
):
results
=
[
"hola"
,
"mundo"
]
...
...
@@ -165,9 +167,7 @@ def get_journals_json(request , project_id, corpus_id ):
JournalsDict
[
journal
]
=
0
JournalsDict
[
journal
]
+=
1
return
JsonHttpResponse
(
JournalsDict
)
session
.
remove
()
def
get_corpuses
(
request
,
node_ids
):
ngrams
=
[
int
(
i
)
for
i
in
node_ids
.
split
(
"+"
)
]
...
...
@@ -178,13 +178,11 @@ def get_corpuses( request , node_ids ):
print
(
r
)
return
JsonHttpResponse
(
[
"tudo"
,
"bem"
]
)
def
get_cores
(
request
):
import
multiprocessing
cpus
=
multiprocessing
.
cpu_count
()
return
JsonHttpResponse
(
{
"data"
:
cpus
}
)
def
get_corpus_state
(
request
,
corpus_id
):
if
not
request
.
user
.
is_authenticated
():
return
JsonHttpResponse
(
{
"request"
:
"forbidden"
}
)
...
...
@@ -199,7 +197,6 @@ def get_corpus_state( request , corpus_id ):
# processing = corpus.hyperdata['Processing']
return
JsonHttpResponse
(
processing
)
def
get_groups
(
request
):
"""
User groups for current user.id
...
...
@@ -226,9 +223,7 @@ def get_groups( request ):
return
JsonHttpResponse
(
common_users
)
def
graph_share
(
request
,
generic
=
100
,
specific
=
100
):
if
request
.
method
==
'GET'
and
"token"
in
request
.
GET
:
# import json
le_token
=
json
.
loads
(
request
.
GET
[
"token"
])[
0
]
...
...
@@ -257,10 +252,10 @@ def graph_share(request, generic=100, specific=100):
'graphfile'
:
graphurl
,
\
}))
return
HttpResponse
(
html
)
session
.
remove
()
return
JsonHttpResponse
(
request
.
GET
[
"token"
])
def
node_link_share
(
request
):
data
=
{
"request"
:
"error"
}
if
request
.
method
==
'GET'
and
"token"
in
request
.
GET
:
...
...
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