Commit 3d93b228 authored by Administrator's avatar Administrator

[FIX] Celery debugged for db.

parent 95016278
from .celery import app as async_app
#from .celery import app as async_app
......@@ -25,7 +25,7 @@ app.conf.update(
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
#app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
from celery import shared_task
......@@ -35,7 +35,7 @@ from celery import shared_task
def debug_task(request):
print('Request: {0!r}'.format(request))
from gargantext_web.db import *
from gargantext_web.db import session, Node
@shared_task
def apply_sum(x, y):
......@@ -43,8 +43,6 @@ def apply_sum(x, y):
print(session.query(Node.name).first())
from parsing.corpustools import add_resource, parse_resources, extract_ngrams, compute_tfidf
......
......@@ -17,7 +17,7 @@ PROJECT_PATH = os.path.abspath(PROJECT_PATH)
import djcelery
djcelery.setup_loader()
BROKER_URL = 'amqp://guest:guest@localhost:5672/'
CELERY_IMPORTS=("node.models","gargantext_web")
CELERY_IMPORTS=("node.models","gargantext_web.celery")
# Quick-start development settings - unsuitable for production
......
......@@ -3,7 +3,8 @@ from .FileParsers import *
parsers = {
'Pubmed (xml format)' : PubmedFileParser,
'Web of Science (ISI format)' : IsiFileParser,
'Scopus ou Zotero (RIS format)' : RisFileParser,
'Scopus (RIS format)' : RisFileParser,
'Zotero (RIS format)' : RisFileParser,
'Jstor (RIS format)' : JstorFileParser,
#'Europress' : EuropressFileParser,
'Europress (French)' : EuropressFileParser,
......
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