From fafd84b8d254c69cad0579a09ce876a4471d1102 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 14 Jan 2015 18:47:31 -0400 Subject: [PATCH] Move magic number variable to the literls.py module --- mayan/apps/ocr/literals.py | 1 + mayan/apps/ocr/tasks.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mayan/apps/ocr/literals.py b/mayan/apps/ocr/literals.py index 7c0e6d3531..8e80534272 100644 --- a/mayan/apps/ocr/literals.py +++ b/mayan/apps/ocr/literals.py @@ -1,3 +1,4 @@ DEFAULT_OCR_FILE_FORMAT = u'tiff' DEFAULT_OCR_FILE_EXTENSION = u'tif' +LOCK_EXPIRE = 60 * 10 # Adjust to worst case scenario UNPAPER_FILE_FORMAT = u'ppm' diff --git a/mayan/apps/ocr/tasks.py b/mayan/apps/ocr/tasks.py index 10552dcdef..0f506e103f 100644 --- a/mayan/apps/ocr/tasks.py +++ b/mayan/apps/ocr/tasks.py @@ -12,10 +12,10 @@ from lock_manager import Lock, LockError from mayan.celery import app from .api import do_document_ocr +from .literals import LOCK_EXPIRE from .models import DocumentQueue, QueueDocument logger = logging.getLogger(__name__) -LOCK_EXPIRE = 60 * 10 # Adjust to worst case scenario @app.task(ignore_result=True)