mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 23:49:38 +00:00
skip post_bulk_restore if empty
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user