mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 20:29:36 +00:00
fix classname type
This commit is contained in:
@@ -153,7 +153,7 @@ class ElasticBackup:
|
|||||||
def restore(self, filename):
|
def restore(self, filename):
|
||||||
"""
|
"""
|
||||||
restore from backup zip file
|
restore from backup zip file
|
||||||
call reset from ElasitIndexWrap first to start blank
|
call reset from ElasticIndexWrap first to start blank
|
||||||
"""
|
"""
|
||||||
zip_content = self._unpack_zip_backup(filename)
|
zip_content = self._unpack_zip_backup(filename)
|
||||||
self._restore_json_files(zip_content)
|
self._restore_json_files(zip_content)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class ElasticIndex:
|
|||||||
_, _ = ElasticWrap(path).put(data)
|
_, _ = ElasticWrap(path).put(data)
|
||||||
|
|
||||||
|
|
||||||
class ElasitIndexWrap:
|
class ElasticIndexWrap:
|
||||||
"""interact with all index mapping and setup"""
|
"""interact with all index mapping and setup"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from random import randint
|
|||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from appsettings.src.config import AppConfig, ReleaseVersion
|
from appsettings.src.config import AppConfig, ReleaseVersion
|
||||||
from appsettings.src.index_setup import ElasitIndexWrap
|
from appsettings.src.index_setup import ElasticIndexWrap
|
||||||
from appsettings.src.snapshot import ElasticSnapshot
|
from appsettings.src.snapshot import ElasticSnapshot
|
||||||
from common.src.env_settings import EnvironmentSettings
|
from common.src.env_settings import EnvironmentSettings
|
||||||
from common.src.es_connect import ElasticWrap
|
from common.src.es_connect import ElasticWrap
|
||||||
@@ -151,7 +151,7 @@ class Command(BaseCommand):
|
|||||||
def _index_setup(self):
|
def _index_setup(self):
|
||||||
"""migration: validate index mappings"""
|
"""migration: validate index mappings"""
|
||||||
self.stdout.write("[6] validate index mappings")
|
self.stdout.write("[6] validate index mappings")
|
||||||
ElasitIndexWrap().setup()
|
ElasticIndexWrap().setup()
|
||||||
|
|
||||||
def _snapshot_check(self):
|
def _snapshot_check(self):
|
||||||
"""migration setup snapshots"""
|
"""migration setup snapshots"""
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Functionality:
|
|||||||
from appsettings.src.backup import ElasticBackup
|
from appsettings.src.backup import ElasticBackup
|
||||||
from appsettings.src.config import ReleaseVersion
|
from appsettings.src.config import ReleaseVersion
|
||||||
from appsettings.src.filesystem import Scanner
|
from appsettings.src.filesystem import Scanner
|
||||||
from appsettings.src.index_setup import ElasitIndexWrap
|
from appsettings.src.index_setup import ElasticIndexWrap
|
||||||
from appsettings.src.manual import ImportFolderScanner
|
from appsettings.src.manual import ImportFolderScanner
|
||||||
from appsettings.src.reindex import Reindex, ReindexManual, ReindexPopulate
|
from appsettings.src.reindex import Reindex, ReindexManual, ReindexPopulate
|
||||||
from celery import Task, shared_task
|
from celery import Task, shared_task
|
||||||
@@ -242,7 +242,7 @@ def run_restore_backup(self, filename):
|
|||||||
|
|
||||||
manager.init(self)
|
manager.init(self)
|
||||||
self.send_progress(["Reset your Index"])
|
self.send_progress(["Reset your Index"])
|
||||||
ElasitIndexWrap().reset()
|
ElasticIndexWrap().reset()
|
||||||
ElasticBackup(task=self).restore(filename)
|
ElasticBackup(task=self).restore(filename)
|
||||||
print("index restore finished")
|
print("index restore finished")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user