kopia lustrzana https://gitlab.com/marnanel/chapeau
Update to new version of celery (so djcelery is removed).
This seems to involve unsetting TEST_RUNNER. I'm not certain this is correct; I'm asking on IRC.2021-05-layout
rodzic
7233d203bd
commit
77b45772bb
|
@ -0,0 +1,3 @@
|
||||||
|
from .celery import app as celery_app
|
||||||
|
|
||||||
|
__all__ = ('celery_app', )
|
|
@ -0,0 +1,13 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
from celery import Celery
|
||||||
|
|
||||||
|
app = Celery('kepi')
|
||||||
|
|
||||||
|
app.config_from_object('django.conf:settings', namespace='CELERY')
|
||||||
|
|
||||||
|
app.autodiscover_tasks()
|
||||||
|
|
||||||
|
@app.task(bind=True)
|
||||||
|
def debug_task(self):
|
||||||
|
print(f'Request: {self.request!r}')
|
|
@ -1,7 +1,5 @@
|
||||||
import os
|
import os
|
||||||
import djcelery
|
|
||||||
import logging
|
import logging
|
||||||
djcelery.setup_loader()
|
|
||||||
|
|
||||||
logger = logging.Logger(name='kepi')
|
logger = logging.Logger(name='kepi')
|
||||||
|
|
||||||
|
@ -84,7 +82,6 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
|
||||||
'djcelery',
|
|
||||||
'django_celery_results',
|
'django_celery_results',
|
||||||
|
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
|
@ -142,8 +139,6 @@ LOGGING = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner'
|
|
||||||
|
|
||||||
TIME_ZONE = 'UTC'
|
TIME_ZONE = 'UTC'
|
||||||
|
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
|
@ -6,7 +6,6 @@ requests-http-signature
|
||||||
cryptography
|
cryptography
|
||||||
pillow
|
pillow
|
||||||
celery>4.0.0
|
celery>4.0.0
|
||||||
django-celery
|
|
||||||
httpretty
|
httpretty
|
||||||
httpsig
|
httpsig
|
||||||
django-celery-results
|
django-celery-results
|
||||||
|
|
Ładowanie…
Reference in New Issue