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
9c7d5f7d
Commit
9c7d5f7d
authored
Jan 07, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] Asynchronous tasks ok for production.
parent
21252bd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
settings.py
gargantext_web/settings.py
+1
-1
views.py
gargantext_web/views.py
+6
-4
No files found.
gargantext_web/settings.py
View file @
9c7d5f7d
...
...
@@ -27,7 +27,7 @@ CELERY_IMPORTS=("node.models",)
SECRET_KEY
=
'bt)3n9v&a02cu7^^=+u_t2tmn8ex5fvx8$x4r*j*pb1yawd+rz'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
Fals
e
DEBUG
=
Tru
e
TEMPLATE_DEBUG
=
True
...
...
gargantext_web/views.py
View file @
9c7d5f7d
...
...
@@ -27,7 +27,7 @@ from parsing.FileParsers import *
# SOME FUNCTIONS
from
gargantext_web.settings
import
DEBUG
from
django.http
import
*
from
django.shortcuts
import
render_to_response
,
redirect
from
django.template
import
RequestContext
...
...
@@ -263,9 +263,11 @@ def project(request, project_id):
try
:
#corpus.parse_and_extract_ngrams()
corpus
.
parse_and_extract_ngrams
.
apply_async
((),
countdown
=
3
)
#corpus.workflow()
#corpus.workflow((), countdown=3)
#corpus.parse_and_extract_ngrams.apply_async((), countdown=3)
if
DEBUG
is
True
:
corpus
.
workflow
()
else
:
corpus
.
workflow
.
apply_async
((),
countdown
=
3
)
except
Exception
as
error
:
print
(
error
)
...
...
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