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