Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
ClientConverterCallback - setting final job conversion state
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotoNomad0 committed Oct 11, 2017
1 parent db40c93 commit d06e0e4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libraries/client/client_converter_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,20 @@ def process_callback(self):
else:
self.job.log_message('{0} function returned successfully.'.format(self.job.convert_module))

if not self.success or len(self.job.errors):
self.job.success = False
self.job.status = "failed"
message = "Conversion failed"
App.logger.debug("Conversion failed, success: {0}, errors: {1}".format(self.success, self.job.errors))
elif len(self.job.warnings) > 0:
self.job.success = True
self.job.status = "warnings"
message = "Conversion successful with warnings"
else:
self.job.success = True
self.job.status = "success"
message = "Conversion successful"

s3_commit_key = 'u/{0}/{1}/{2}'.format(self.job.user_name, self.job.repo_name, self.job.commit_id)
upload_key = s3_commit_key
if multiple_project:
Expand Down

0 comments on commit d06e0e4

Please sign in to comment.