Commit 410ddac6 authored by delanoe's avatar delanoe

[FIX] Celery ok

parent 89fd1d53
...@@ -39,10 +39,13 @@ import djcelery ...@@ -39,10 +39,13 @@ import djcelery
djcelery.setup_loader() djcelery.setup_loader()
BROKER_URL = 'amqp://guest:guest@localhost:5672/' BROKER_URL = 'amqp://guest:guest@localhost:5672/'
CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml'] CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
CELERY_IMPORTS = ( "gargantext.util.toolchain",
CELERY_IMPORTS = (
"gargantext.util.toolchain",
"gargantext.util.crawlers",
"graph.cooccurrences", "graph.cooccurrences",
"gargantext.util.toolchain.main.parse_extract_indexhyperdata", "moissonneurs.pubmed",
"gargantext.util.toolchain.main.parse_extract", "moissonneurs.istex",
) )
......
...@@ -101,7 +101,7 @@ class Crawler: ...@@ -101,7 +101,7 @@ class Crawler:
) )
session.add(corpus) session.add(corpus)
session.commit() session.commit()
scheduled(parse_extract_indexhyperdata(corpus.id)) scheduled(parse_extract_indexhyperdata)(corpus.id)
else: else:
#add the resource #add the resource
corpus.add_resource( corpus.add_resource(
......
from .main import parse_extract_indexhyperdata from .main import parse_extract_indexhyperdata
from .main import parse_extract
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment