@@ -38,8 +38,7 @@ def push_repo():
3838 cloned_repo = clone_repo (parsed_url , repo )
3939
4040 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 )
4342
4443 return jsonify ({"status_key" : parsed_url .repo }), 202
4544
@@ -69,12 +68,12 @@ def create_repo_object(data):
6968 return repo
7069
7170
72- def upload_repo (cloned_repo ):
71+ def upload_repo (cloned_repo , channel_name ):
7372 try :
7473 pantheon .start_process (numeric_level = 10 , pw = current_app .config ['UPLOADER_PASSWORD' ],
7574 user = current_app .config ['UPLOADER_USER' ],
7675 server = current_app .config ['PANTHEON_SERVER' ], directory = cloned_repo .working_dir ,
77- use_broker = True )
76+ use_broker = True , channel = channel_name )
7877 except Exception as e :
7978 logger .error ("Upload failed due to error=" + str (e ))
8079
@@ -95,12 +94,13 @@ def status():
9594
9695 status_message = Status (current_status = status_data ['current_status' ],
9796 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 ' ),
9998 total_files_uploaded = status_data .get ('total_files_uploaded' ))
10099 return jsonify (
101100 dict (status = status_message .current_status ,
102101 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
104104
105105
106106def get_upload_data ():
0 commit comments