CLI 'index_users_rebuild' should gracefully stop when Algolia isn't configured.

This commit is contained in:
Sybren A. Stüvel 2017-05-31 11:03:33 +02:00
parent 34b9be4efa
commit bfbcdee926

View File

@ -131,6 +131,9 @@ def index_users_rebuild():
from pillar.api.utils.algolia import algolia_index_user_save
users_index = current_app.algolia_index_users
if users_index is None:
log.error('Algolia is not configured properly, unable to do anything!')
return 1
log.info('Dropping existing index: %s', users_index)
users_index.clear_index()