Skip to content

Commit faca6de

Browse files
committed
fixup index name
1 parent bbbdca5 commit faca6de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readthedocs/search/management/commands/reindex_elasticsearch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def _run_reindex_tasks(self, models):
3939
model_name = qs.model.__name__
4040

4141
index_name = doc._doc_type.index
42-
timestamp_prefix = 'temp-{}-'.format(datetime.datetime.now().strftime('%Y%m%d%H%M%S'))
43-
new_index_name = timestamp_prefix + index_name
42+
timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
43+
new_index_name = "{}_{}".format(index_name, timestamp)
4444

4545
pre_index_task = create_new_es_index_task.si(app_label=app_label,
4646
model_name=model_name,

0 commit comments

Comments
 (0)