Skip to content

Commit

Permalink
code golf
Browse files Browse the repository at this point in the history
  • Loading branch information
genevera committed Apr 8, 2019
1 parent ac16f66 commit c0ab5af
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions curator/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2156,11 +2156,13 @@ def do_action(self):
self.loggit.info('Shrinking index "{0}" to "{1}" with settings: {2}, wait_for_active_shards={3}'.format(idx, target, self.body, self.wait_for_active_shards))
try:


self.client.indices.shrink(index=idx, params=self.shrink_copy_settings, target=target, body=self.body, wait_for_active_shards=self.wait_for_active_shards)
self.loggit.debug('unblocking writes on {0}'.format(target))
self._unblock_writes(target)
self.loggit.debug('undoing route reqs for {0}'.format(target))
self.route_index(target, 'require', '_name', '')
if utils.get_version(self.client) >= (6,4,3):
self.loggit.debug('unblocking writes on {0}'.format(target))
self._unblock_writes(target)
self.loggit.debug('undoing route reqs for {0}'.format(target))
self.route_index(target, 'require', '_name', '')
# Wait for it to complete
if self.wfc:
self.loggit.debug('Wait for shards to complete allocation for index: {0}'.format(target))
Expand Down

0 comments on commit c0ab5af

Please sign in to comment.