Lazy load of 10MB backup-recovery module
@@ -9,7 +9,6 @@ import urllib
import tornado.httpclient
from appscale.common import appscale_info
from appscale.common.unpackaged import APPSCALE_PYTHON_APPSERVER
-from appscale.datastore.backup import backup_recovery_helper as BR
from appscale.datastore.backup.br_constants import StorageTypes
from appscale.hermes import constants
@@ -309,6 +308,7 @@ def backup_apps(storage, bucket):
Returns:
True on success, False otherwise.
"""
+ from appscale.datastore.backup import backup_recovery_helper as BR
full_bucket_name = ''
if storage == StorageTypes.GCS:
full_bucket_name = 'gs://{0}'.format(bucket)
@@ -325,4 +325,5 @@ def restore_apps(storage, bucket):
Returns:
True on success, False otherwise.
"""
+ from appscale.datastore.backup import backup_recovery_helper as BR
return BR.app_restore(storage, bucket_name=bucket)
