Build job does not have a request context when calling get_file_url

We therefore need to specify some sort of IP or get_file_url will attempt to get it from context
This commit is contained in:
Joseph Schorr 2017-10-05 15:20:16 -04:00
parent 3bef21253d
commit 2ce4e49711
6 changed files with 12 additions and 8 deletions

View file

@ -363,7 +363,7 @@ def buildlogs(build_uuid):
# If the logs have been archived, just return a URL of the completed archive
if found_build.logs_archived:
return redirect(log_archive.get_file_url(found_build.uuid))
return redirect(log_archive.get_file_url(found_build.uuid, request.remote_addr))
_, logs = build_logs.get_log_entries(found_build.uuid, 0)
response = jsonify({