Backport workflow preview refactor

GitLab issue #532.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-07-06 02:41:16 -04:00
parent 9e068c3e83
commit fbb0f0b9bd
15 changed files with 194 additions and 55 deletions
+13 -4
View File
@@ -3,12 +3,21 @@ from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_slow
from mayan.apps.task_manager.workers import worker_fast, worker_slow
queue_document_states = CeleryQueue(
name='document_states', label=_('Document states'), worker=worker_slow
label=_('Document states'), name='document_states', worker=worker_slow
)
queue_document_states_fast = CeleryQueue(
label=_('Document states fast'), name='document_states_fast',
worker=worker_fast
)
queue_document_states.add_task_type(
dotted_path='mayan.apps.document_states.tasks.task_launch_all_workflows',
label=_('Launch all workflows')
label=_('Launch all workflows'),
dotted_path='mayan.apps.document_states.tasks.task_launch_all_workflows'
)
queue_document_states_fast.add_task_type(
label=_('Generate workflow previews'),
dotted_path='mayan.apps.document_states.tasks.task_generate_workflow_image'
)