Skip to content

Commit

Permalink
Merge pull request #56 from wp-media/develop
Browse files Browse the repository at this point in the history
Enhance logs
  • Loading branch information
MathieuLamiot authored Nov 9, 2023
2 parents 8f823d9 + f2b4ad3 commit 81b30fd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sources/handlers/DeployHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def deploy_commit(self, app_context, task_params: DeployHandlerParam):
request_payload['environment'] = task_params.env
request_payload['ref'] = task_params.commit

current_app.logger.info("deploy_commit: Requesting a deployment:/n" +
json.dumps(request_payload) + "/n" +
current_app.logger.info("deploy_commit: Requesting a deployment:\n" +
json.dumps(request_payload) + "\n" +
json.dumps(request_header))
result = requests.post(url=self.godp_deploy_url,
headers=request_header,
Expand All @@ -50,8 +50,4 @@ def deploy_commit(self, app_context, task_params: DeployHandlerParam):
current_app.logger.error("deploy_commit: GODP call failed.")
raise ValueError('GODP call failed.')
result_json = result.json()
if result_json["url"]:
current_app.logger.info("deploy_commit: GODP Response:/n" + result_json)
else:
current_app.logger.error("deploy_commit: GODP did not return a deploy URL.")
raise ValueError('GODP did not return a deploy URL.')
current_app.logger.info("deploy_commit: GODP Response:\n" + result_json)

0 comments on commit 81b30fd

Please sign in to comment.