Skip to content

Commit

Permalink
Use find by regex for archive index in index cleaner (#1693)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <ploffay@redhat.com>
  • Loading branch information
pavolloffay authored Jul 26, 2019
1 parent 5cd5752 commit f6fc248
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/storage/es/esCleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ def filter_main_indices_rollover(ilo, prefix):
def filter_archive_indices_rollover(ilo, prefix):
# Remove only rollover archive indices
# Do not remove active write archive index
ilo.filter_by_regex(kind='regex', value=prefix + "jaeger-span-archive-\d{6}")
empty_list(ilo, "No indices to delete")
ilo.filter_by_alias(aliases=[prefix + 'jaeger-span-archive-write'], exclude=True)
empty_list(ilo, "No indices to delete")
ilo.filter_by_alias(aliases=[prefix + 'jaeger-span-archive-read'])
ilo.filter_by_age(source='creation_date', direction='older', unit='days', unit_count=int(sys.argv[1]))


Expand Down

0 comments on commit f6fc248

Please sign in to comment.