Move document image queueing up in process to avoid queueing serialization overhead
This commit is contained in:
13
mayan/apps/documents/tasks.py
Normal file
13
mayan/apps/documents/tasks.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import logging
|
||||
|
||||
from mayan.celery import app
|
||||
|
||||
from .models import Document
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@app.task
|
||||
def task_get_document_image(document_id, *args, **kwargs):
|
||||
document = Document.objects.get(pk=document_id)
|
||||
return document.get_image(*args, **kwargs)
|
||||
Reference in New Issue
Block a user