Exemplo n.º 1
0
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

queue_search = CeleryQueue(label=_('Search'),
                           name='search',
                           worker=worker_slow)
queue_search.add_task_type(
    dotted_path='mayan.apps.dynamic_search.tasks.task_deindex_instance',
    label=_('Remove a model instance from the search engine.'),
    name='task_index_instance',
)
queue_search.add_task_type(
    dotted_path='mayan.apps.dynamic_search.tasks.task_index_instance',
    label=_('Index a model instance to the search engine.'),
    name='task_deindex_instance',
)
Exemplo n.º 2
0
from datetime import timedelta

from django.utils.translation import ugettext_lazy as _

from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_medium, worker_slow

from .literals import DELETE_STALE_UPLOADS_INTERVAL

queue_default = CeleryQueue(
    default_queue=True, label=_('Default'), name='default', worker=worker_medium
)
queue_tools = CeleryQueue(label=_('Tools'), name='tools', worker=worker_slow)
queue_common_periodic = CeleryQueue(
    label=_('Common periodic'), name='common_periodic', transient=True,
    worker=worker_slow
)
queue_common_periodic.add_task_type(
    dotted_path='mayan.apps.common.tasks.task_delete_stale_uploads',
    label=_('Delete stale uploads'), name='task_delete_stale_uploads',
    schedule=timedelta(
        seconds=DELETE_STALE_UPLOADS_INTERVAL
    )
)
Exemplo n.º 3
0
from django.utils.translation import ugettext_lazy as _

from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_fast, worker_slow

queue_document_states = CeleryQueue(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(
    label=_('Launch all workflows'),
    dotted_path='mayan.apps.document_states.tasks.task_launch_all_workflows')
queue_document_states.add_task_type(
    label=_('Launch a workflow'),
    dotted_path='mayan.apps.document_states.tasks.task_launch_workflow')
queue_document_states_fast.add_task_type(
    label=_('Generate workflow previews'),
    dotted_path='mayan.apps.document_states.tasks.task_generate_workflow_image'
)
Exemplo n.º 4
0
from __future__ import absolute_import, unicode_literals

from datetime import timedelta

from django.utils.translation import ugettext_lazy as _

from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_medium

from .literals import CHECK_EXPIRED_CHECK_OUTS_INTERVAL

queue_checkouts_periodic = CeleryQueue(label=_('Checkouts periodic'),
                                       name='checkouts_periodic',
                                       transient=True,
                                       worker=worker_medium)
queue_checkouts_periodic.add_task_type(
    label=_('Check expired checkouts'),
    name='task_check_expired_check_outs',
    dotted_path='mayan.apps.checkouts.tasks.task_check_expired_check_outs',
    schedule=timedelta(seconds=CHECK_EXPIRED_CHECK_OUTS_INTERVAL),
)
Exemplo n.º 5
0
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

queue_document_states = CeleryQueue(
    name='document_states', label=_('Document states'), worker=worker_slow
)
queue_document_states.add_task_type(
    dotted_path='mayan.apps.document_states.tasks.task_launch_all_workflows',
    label=_('Launch all workflows')
)
Exemplo n.º 6
0
from datetime import timedelta

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 .literals import DELETE_STALE_UPLOADS_INTERVAL

queue_storage_periodic = CeleryQueue(label=_('Storage periodic'),
                                     name='storage_periodic',
                                     transient=True,
                                     worker=worker_slow)
queue_storage_periodic.add_task_type(
    dotted_path='mayan.apps.storage.tasks.task_delete_stale_uploads',
    label=_('Delete stale uploads'),
    name='task_delete_stale_uploads',
    schedule=timedelta(seconds=DELETE_STALE_UPLOADS_INTERVAL))
Exemplo n.º 7
0
from __future__ import absolute_import, unicode_literals

from django.utils.translation import ugettext_lazy as _

from mayan.apps.common.queues import queue_tools
from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_medium

queue_signatures = CeleryQueue(label=_('Signatures'), name='signatures', worker=worker_medium)

queue_signatures.add_task_type(
    label=_('Verify key signatures'),
    dotted_path='mayan.apps.document_signatures.tasks.task_verify_key_signatures'
)
queue_signatures.add_task_type(
    label=_('Unverify key signatures'),
    dotted_path='mayan.apps.document_signatures.tasks.task_unverify_key_signatures'
)
queue_signatures.add_task_type(
    label=_('Verify document version'),
    dotted_path='mayan.apps.document_signatures.tasks.task_verify_document_version'
)

queue_tools.add_task_type(
    label=_('Verify missing embedded signature'),
    dotted_path='mayan.apps.document_signatures.tasks.task_verify_missing_embedded_signature'
)
Exemplo n.º 8
0
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

queue_ocr = CeleryQueue(name='ocr', label=_('OCR'), worker=worker_slow)

queue_ocr.add_task_type(
    dotted_path='mayan.apps.ocr.tasks.task_document_version_finished',
    label=_('Finish document version OCR'))
queue_ocr.add_task_type(
    dotted_path='mayan.apps.ocr.tasks.task_document_version_page_process_ocr',
    label=_('Document version page OCR'))
queue_ocr.add_task_type(
    dotted_path='mayan.apps.ocr.tasks.task_document_version_process',
    label=_('Document version OCR'))
Exemplo n.º 9
0
from django.utils.translation import ugettext_lazy as _

from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_fast, worker_medium

queue_sources = CeleryQueue(label=_('Sources'),
                            name='sources',
                            worker=worker_medium)
queue_sources_periodic = CeleryQueue(label=_('Sources periodic'),
                                     name='sources_periodic',
                                     transient=True,
                                     worker=worker_medium)
queue_sources_fast = CeleryQueue(label=_('Sources fast'),
                                 name='sources_fast',
                                 transient=True,
                                 worker=worker_fast)

queue_sources_fast.add_task_type(
    label=_('Generate staging file image'),
    dotted_path='mayan.apps.sources.tasks.task_generate_staging_file_image')
queue_sources_periodic.add_task_type(
    label=_('Check interval source'),
    dotted_path='mayan.apps.sources.tasks.task_check_interval_source')
queue_sources.add_task_type(
    label=_('Handle upload'),
    dotted_path='mayan.apps.sources.tasks.task_source_handle_upload')
queue_sources.add_task_type(
    label=_('Upload document'),
    dotted_path='mayan.apps.sources.tasks.task_upload_document')
Exemplo n.º 10
0
from django.utils.translation import ugettext_lazy as _

from mayan.apps.common.queues import queue_tools
from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_medium

queue_indexing = CeleryQueue(label=_('Indexing'),
                             name='indexing',
                             worker=worker_medium)

queue_indexing.add_task_type(
    label=_('Delete empty index nodes'),
    dotted_path='mayan.apps.document_indexing.tasks.task_delete_empty')
queue_indexing.add_task_type(
    label=_('Remove document'),
    dotted_path='mayan.apps.document_indexing.tasks.task_remove_document')
queue_indexing.add_task_type(
    label=_('Index document'),
    dotted_path='mayan.apps.document_indexing.tasks.task_index_document')
queue_tools.add_task_type(
    label=_('Rebuild index'),
    dotted_path='mayan.apps.document_indexing.tasks.task_rebuild_index')
Exemplo n.º 11
0
from __future__ import absolute_import, unicode_literals

from datetime import timedelta

from django.utils.translation import ugettext_lazy as _

from mayan.apps.common.queues import queue_tools
from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_fast, worker_medium

from .literals import (CHECK_DELETE_PERIOD_INTERVAL,
                       CHECK_TRASH_PERIOD_INTERVAL,
                       DELETE_STALE_STUBS_INTERVAL)

queue_converter = CeleryQueue(name='converter',
                              label=_('Converter'),
                              transient=True,
                              worker=worker_fast)
queue_documents_periodic = CeleryQueue(name='documents_periodic',
                                       label=_('Documents periodic'),
                                       transient=True,
                                       worker=worker_medium)
queue_uploads = CeleryQueue(name='uploads',
                            label=_('Uploads'),
                            worker=worker_medium)
queue_documents = CeleryQueue(name='documents',
                              label=_('Documents'),
                              worker=worker_medium)

queue_converter.add_task_type(
    dotted_path='mayan.apps.documents.tasks.task_generate_document_page_image',
    label=_('Generate document page image'))
Exemplo n.º 12
0
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

queue_statistics = CeleryQueue(label=_('Statistics'),
                               name='statistics',
                               transient=True,
                               worker=worker_slow)

task_execute_statistic = queue_statistics.add_task_type(
    label=_('Execute statistic'),
    dotted_path='mayan.apps.mayan_statistics.tasks.task_execute_statistic')
Exemplo n.º 13
0
from __future__ 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

queue_ocr = CeleryQueue(name='ocr', label=_('OCR'), worker=worker_slow)
queue_ocr.add_task_type(dotted_path='mayan.apps.ocr.tasks.task_do_ocr',
                        label=_('Document version OCR'))
Exemplo n.º 14
0
from __future__ 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

queue_ocr = CeleryQueue(name='parsing', label=_('Parsing'), worker=worker_slow)
queue_ocr.add_task_type(
    dotted_path='mayan.apps.document_parsing.tasks.task_parse_document_version',
    label=_('Document version parsing'))
Exemplo n.º 15
0
from django.utils.translation import ugettext_lazy as _

from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_medium

queue_metadata = CeleryQueue(label=_('Metadata'),
                             name='metadata',
                             worker=worker_medium)
queue_metadata.add_task_type(
    label=_('Remove metadata type'),
    dotted_path='mayan.apps.metadata.tasks.task_remove_metadata_type')
queue_metadata.add_task_type(
    label=_('Add required metadata type'),
    dotted_path='mayan.apps.metadata.tasks.task_add_required_metadata_type')
Exemplo n.º 16
0
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_medium

queue = CeleryQueue(label=_('File metadata'),
                    name='file_metadata',
                    worker=worker_medium)
queue.add_task_type(
    label=_('Process document version'),
    dotted_path='mayan.apps.file_metadata.tasks.task_process_document_version')
Exemplo n.º 17
0
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

queue_mailing = CeleryQueue(label=_('Mailing'),
                            name='mailing',
                            worker=worker_slow)
queue_mailing.add_task_type(
    label=_('Send document'),
    dotted_path='mayan.apps.mailer.tasks.task_send_document')
Exemplo n.º 18
0
from django.utils.translation import ugettext_lazy as _

from mayan.apps.task_manager.classes import CeleryQueue
from mayan.apps.task_manager.workers import worker_medium, worker_slow

queue_default = CeleryQueue(default_queue=True,
                            label=_('Default'),
                            name='default',
                            worker=worker_medium)
queue_tools = CeleryQueue(label=_('Tools'), name='tools', worker=worker_slow)