mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 14:59:15 +02:00
Resolve "Per-user libraries" (use !368 instead)
This commit is contained in:
parent
b0ca181016
commit
2ea21994ee
144 changed files with 6749 additions and 5347 deletions
|
@ -2,20 +2,29 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import functools
|
||||
import traceback as tb
|
||||
import os
|
||||
|
||||
from celery import Celery
|
||||
import logging
|
||||
import celery.app.task
|
||||
from django.apps import AppConfig
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
logger = logging.getLogger("celery")
|
||||
|
||||
if not settings.configured:
|
||||
# set the default Django settings module for the 'celery' program.
|
||||
os.environ.setdefault(
|
||||
"DJANGO_SETTINGS_MODULE", "config.settings.local"
|
||||
) # pragma: no cover
|
||||
|
||||
app = celery.Celery("funkwhale_api")
|
||||
|
||||
app = Celery("funkwhale_api")
|
||||
|
||||
@celery.signals.task_failure.connect
|
||||
def process_failure(sender, task_id, exception, args, kwargs, traceback, einfo, **kw):
|
||||
print("[celery] Error during task {}: {}".format(task_id, einfo.exception))
|
||||
tb.print_exc()
|
||||
|
||||
|
||||
class CeleryConfig(AppConfig):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue