skip post_bulk_restore if empty

pull/25/head
simon 3 years ago
parent 4b9acd4c51
commit c17e2e6dd1

@ -481,6 +481,9 @@ class ElasticBackup:
with open(file_path, 'r', encoding='utf-8') as f:
query_str = f.read()
if not query_str.strip():
return
url = es_url + '/_bulk'
request = requests.post(url, data=query_str, headers=headers)
if not request.ok:

Loading…
Cancel
Save