mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-05 01:29:24 +00:00
fix ignoring progress message when not initiated with task
This commit is contained in:
@@ -32,7 +32,8 @@ class ElasticBackup:
|
|||||||
if not self.reason:
|
if not self.reason:
|
||||||
raise ValueError("missing backup reason in ElasticBackup")
|
raise ValueError("missing backup reason in ElasticBackup")
|
||||||
|
|
||||||
self.task.send_progress(["Scanning your index."])
|
if self.task:
|
||||||
|
self.task.send_progress(["Scanning your index."])
|
||||||
for index in self.index_config:
|
for index in self.index_config:
|
||||||
index_name = index["index_name"]
|
index_name = index["index_name"]
|
||||||
print(f"backup: export in progress for {index_name}")
|
print(f"backup: export in progress for {index_name}")
|
||||||
@@ -42,7 +43,8 @@ class ElasticBackup:
|
|||||||
|
|
||||||
self.backup_index(index_name)
|
self.backup_index(index_name)
|
||||||
|
|
||||||
self.task.send_progress(["Compress files to zip archive."])
|
if self.task:
|
||||||
|
self.task.send_progress(["Compress files to zip archive."])
|
||||||
self.zip_it()
|
self.zip_it()
|
||||||
if self.reason == "auto":
|
if self.reason == "auto":
|
||||||
self.rotate_backup()
|
self.rotate_backup()
|
||||||
|
|||||||
Reference in New Issue
Block a user