@@ -38,8 +38,7 @@ def push_repo():
38
38
cloned_repo = clone_repo (parsed_url , repo )
39
39
40
40
logger .info ("starting upload of repo=" + repo .repo + " (local dir=" + cloned_repo .working_dir )
41
- pantheon .channel_name = parsed_url .repo
42
- executor .submit (upload_repo , cloned_repo )
41
+ executor .submit (upload_repo , cloned_repo , parsed_url .repo )
43
42
44
43
return jsonify ({"status_key" : parsed_url .repo }), 202
45
44
@@ -69,12 +68,12 @@ def create_repo_object(data):
69
68
return repo
70
69
71
70
72
- def upload_repo (cloned_repo ):
71
+ def upload_repo (cloned_repo , channel_name ):
73
72
try :
74
73
pantheon .start_process (numeric_level = 10 , pw = current_app .config ['UPLOADER_PASSWORD' ],
75
74
user = current_app .config ['UPLOADER_USER' ],
76
75
server = current_app .config ['PANTHEON_SERVER' ], directory = cloned_repo .working_dir ,
77
- use_broker = True )
76
+ use_broker = True , channel = channel_name )
78
77
except Exception as e :
79
78
logger .error ("Upload failed due to error=" + str (e ))
80
79
@@ -95,12 +94,13 @@ def status():
95
94
96
95
status_message = Status (current_status = status_data ['current_status' ],
97
96
file_type = status_data .get ('type_uploading' , "" ),
98
- last_uploaded_file = status_data .get ('last_uploaded_file ' ),
97
+ last_uploaded_file = status_data .get ('last_file_uploaded ' ),
99
98
total_files_uploaded = status_data .get ('total_files_uploaded' ))
100
99
return jsonify (
101
100
dict (status = status_message .current_status ,
102
101
currently_uploading = status_message .processing_file_type ,
103
- last_uploaded_file = status_message .last_uploaded_file )), 200
102
+ last_uploaded_file = status_message .last_uploaded_file ,
103
+ total_files_uploaded = status_message .total_files_uploaded )), 200
104
104
105
105
106
106
def get_upload_data ():
0 commit comments