Files
mayan-edms/apps/dynamic_search/post_init.py
2012-09-14 02:00:59 -04:00

15 lines
554 B
Python

from __future__ import absolute_import
from django.utils.translation import ugettext_lazy as _
from scheduler.api import LocalScheduler
from .settings import INDEX_UPDATE_INTERVAL
from .jobs import search_index_update
def init_start_indexing_job():
dynamic_search_scheduler = LocalScheduler('search', _(u'Search'))
dynamic_search_scheduler.add_interval_job('search_index_update', _(u'Update the search index with the most recent modified documents.'), search_index_update, seconds=INDEX_UPDATE_INTERVAL)
dynamic_search_scheduler.start()