mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 17:49:27 +02:00
See #228: more performante federation import launch via API
This commit is contained in:
parent
4f8db661fa
commit
eded32c2e8
4 changed files with 25 additions and 7 deletions
|
@ -173,6 +173,13 @@ def import_job_run(self, import_job, replace=False, use_acoustid=False):
|
|||
raise
|
||||
|
||||
|
||||
@celery.app.task(name='ImportBatch.run')
|
||||
@celery.require_instance(models.ImportBatch, 'import_batch')
|
||||
def import_batch_run(import_batch):
|
||||
for job_id in import_batch.jobs.order_by('id').values_list('id', flat=True):
|
||||
import_job_run.delay(import_job_id=job_id)
|
||||
|
||||
|
||||
@celery.app.task(name='Lyrics.fetch_content')
|
||||
@celery.require_instance(models.Lyrics, 'lyrics')
|
||||
def fetch_content(lyrics):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue