remove the ES hold stuff. (bug 865432)

ack indexing tasks once indexing is done. (bug 850913)
This commit is contained in:
Allen Short 2013-04-24 18:46:58 -07:00
Родитель 4e59e66176
Коммит c83cb0217c
2 изменённых файлов: 2 добавлений и 13 удалений

Просмотреть файл

@ -1559,12 +1559,8 @@ def version_changed(sender, **kw):
dispatch_uid='addons.search.index')
def update_search_index(sender, instance, **kw):
from . import tasks
if not kw.get('raw'):
if settings.IN_TEST_SUITE:
tasks.index_addon_held([instance.id])
else:
tasks.index_addons([instance.id])
tasks.index_addons.delay([instance.id])
@Addon.on_change

Просмотреть файл

@ -104,14 +104,7 @@ def delete_preview_files(id, **kw):
log.error('Error deleting preview file (%s): %s' % (f, e))
def index_addon_held(ids, **kw):
# Hold the indexes till the end of the request or until lib.es signal,
# process is called.
for pk in ids:
add(index_addons, pk)
@task
@task(acks_late=True)
def index_addons(ids, **kw):
log.info('Indexing addons %s-%s. [%s]' % (ids[0], ids[-1], len(ids)))
transforms = (attach_categories, attach_devices, attach_prices,