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
534f706f
Commit
534f706f
authored
Jun 20, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use recommended setup for Celery
Note: does it improve anything?
parent
92431aa8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
1 deletion
+23
-1
__init__.py
gargantext/__init__.py
+1
-0
celery.py
gargantext/celery.py
+18
-0
settings.py
gargantext/settings.py
+4
-1
No files found.
gargantext/__init__.py
View file @
534f706f
from
.celery
import
app
as
celery_app
gargantext/celery.py
0 → 100644
View file @
534f706f
"""
Setup the Celery instance (see also gargantext/__init__.py) that will be
used by all shared_task.
This is the recommended way:
http://docs.celeryproject.org/en/3.1/django/first-steps-with-django.html
"""
import
os
from
celery
import
Celery
os
.
environ
.
setdefault
(
'DJANGO_SETTINGS_MODULE'
,
'gargantext.settings'
)
from
django.conf
import
settings
#noqa
app
=
Celery
(
'gargantext'
)
app
.
config_from_object
(
'django.conf:settings'
)
app
.
autodiscover_tasks
(
lambda
:
settings
.
INSTALLED_APPS
)
gargantext/settings.py
View file @
534f706f
...
...
@@ -34,9 +34,12 @@ ALLOWED_HOSTS = ["localhost", ".gargantext.org", ".iscpif.fr",]
import
djcelery
djcelery
.
setup_loader
()
BROKER_URL
=
'amqp://guest:guest@localhost:5672/'
CELERY_ACCEPT_CONTENT
=
[
'pickle'
,
'json'
,
'msgpack'
,
'yaml'
]
CELERY_ACCEPT_CONTENT
=
[
'pickle'
,
'json'
,
'msgpack'
,
'yaml'
]
CELERY_TIMEZONE
=
'Europe/Paris'
CELERYBEAT_SCHEDULER
=
'djcelery.schedulers.DatabaseScheduler'
CELERY_IMPORTS
=
(
"gargantext.util.toolchain"
,
"gargantext.util.crawlers"
,
...
...
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