Skip to content

Commit 2932c39

Browse files
committed
import fix for aws
gcp class name as aws
1 parent a8015e0 commit 2932c39

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

backup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
import logging
44
import threading
5-
from cloud.aws import Upload
5+
from cloud import aws
66
from common import common
77

88
class KBackup:
@@ -106,7 +106,7 @@ def main():
106106
logging.debug(f"setting RETRY_UPLOAD_SECONDS to default 60 ")
107107
retry_upload_seconds = 60
108108

109-
Upload.s3_upload(bucket,tmp_dir,topic_name,retry_upload_seconds,b.NUMBER_OF_KAFKA_THREADS + 1)
109+
aws.Upload.s3_upload(bucket,tmp_dir,topic_name,retry_upload_seconds,b.NUMBER_OF_KAFKA_THREADS + 1)
110110

111111
except KeyError as e:
112112
logging.error(f"unable to set s3 required variables {e}")

cloud/gcp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from common import common
66
from google.cloud import storage
77

8-
class gUpload:
8+
class Upload:
99

1010
def gcs_upload_file(gcs_client,bucket,file_name,object_name):
1111

@@ -40,7 +40,7 @@ def gcs_upload(bucket,dir,topic_name,retry_upload_seconds,thread_count):
4040
logging.info(f"gcs upload retry for new files in {retry_upload_seconds} seconds")
4141
time.sleep(retry_upload_seconds)
4242

43-
class gDownload:
43+
class Download:
4444

4545
def gcs_list_blobs_with_prefix(gcs_client,bucket,start_offset=None,end_offset=None,prefix=None):
4646
return gcs_client.list_blobs(

restore.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import confluent_kafka
66
import time
77
from common import common
8-
from cloud.aws import Download
8+
from cloud import aws
99

1010
class KRestore:
1111

@@ -129,7 +129,7 @@ def main():
129129

130130
if b.FILESYSTEM_TYPE == "S3":
131131
threading.Thread(
132-
target=Download.s3_download,
132+
target=aws.Download.s3_download,
133133
args=[b.BUCKET_NAME, b.BACKUP_TOPIC_NAME,b.FILESYSTEM_BACKUP_DIR,b.RETRY_SECONDS],
134134
name="S3 Download"
135135
).start()

0 commit comments

Comments
 (0)