SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 5ccb9a2a authored by Boris Ponsioen's avatar Boris Ponsioen
Browse files

Removes django-background-tasks in favor of Celery.

On staging, everything is started by running ~/start_celery.sh - should
work now for testing.
parent 7932544b
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,6 @@ INSTALLED_APPS = (
'django_mathjax',
'affiliations',
'ajax_select',
'background_task',
'captcha',
'colleges',
'commentaries',
......
from __future__ import absolute_import, unicode_literals
import requests
from .models import Citable, CitableWithDOI, Journal
from background_task import background
from rest_framework import serializers
from mongoengine.python_support import pymongo
from django.utils import timezone
......@@ -10,7 +9,6 @@ from celery import shared_task, current_task
logger = logging.getLogger(__name__)
# @background()
@shared_task
def import_journal_full(issn, cursor='*'):
"""
......@@ -19,7 +17,6 @@ def import_journal_full(issn, cursor='*'):
"""
import_journal(issn=issn, cursor=cursor, from_index_date=None)
# @background()
@shared_task
def import_journal_incremental(issn, from_index_date, cursor='*'):
"""
......@@ -162,7 +159,6 @@ def convert_doi_to_lower_case():
if i % 1000 == 0:
print(i)
@background()
def add_journal_to_existing(journal_issn=None):
# Take journal from metadata ('container-title') and put it in top-level 'journal' field
# for all existing citables
......
......@@ -51,7 +51,6 @@ html2text
# Mongo (Metacore)
mongoengine==0.15.0
django-background-tasks==1.1.13
celery==4.1.1
django-celery-results==1.0.1
django-celery-beat==1.1.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment