Files
mayan-edms/mayan/apps/control_codes/tasks.py
Roberto Rosario 2819f9445b Add control codes app proof of concept
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-08-30 05:22:13 -04:00

25 lines
547 B
Python

from __future__ import unicode_literals
import logging
from django.apps import apps
from mayan.celery import app
from .classes import ControlCode
logger = logging.getLogger(__name__)
@app.task(ignore_result=True)
def task_process_document_version(document_version_id):
DocumentVersion = apps.get_model(
app_label='documents', model_name='DocumentVersion'
)
document_version = DocumentVersion.objects.get(pk=document_version_id)
ControlCode.process_document_version(
document_version=document_version
)