Refactor the workflow preview generation to work as a background task API service. Solves GitLab issue #532. The image generation runs as an out of process task ensuring that the HTTP request is never compromised. A new task queue named "document_states_fast" was created. The settings WORKFLOWS_IMAGE_CACHE_TIME, WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND, WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND_ARGUMENTS we added. Images generated are stored by default under /mayan/media/workflows. The Dockerfile and deployment instructions are updated to include the new queue. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
10 lines
206 B
Python
10 lines
206 B
Python
from __future__ import absolute_import, unicode_literals
|
|
|
|
from django import forms
|
|
|
|
from .widgets import WorkflowImageWidget
|
|
|
|
|
|
class WorfklowImageField(forms.fields.Field):
|
|
widget = WorkflowImageWidget
|