Skip to content

Commit

Permalink
Merge pull request #24 from KPMP/fix-changelog
Browse files Browse the repository at this point in the history
Release 3.5
  • Loading branch information
zwright authored Nov 20, 2024
2 parents 1b9fa34 + ff26679 commit a5a5940
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
build-project:
env:
IMAGE_TAG: 3.4
IMAGE_TAG: 3.5
runs-on: ubuntu-latest
steps:
- name: Get branch names
Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
uses: docker/build-push-action@v5
with:
push: true
tags: kingstonduo/atlas-file-service:${{ steps.branch-names.outputs.current_branch }}
tags: kingstonduo/atlas-file-service:${{ steps.branch-names.outputs.current_branch }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ COPY app.py app.py
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
RUN pip3 install -U flask-cors
CMD ["gunicorn", "-b", ":5000", "app:app"]
CMD ["uwsgi", "--http-socket", "0.0.0.0:5000", "--socket-timeout", "600", "--processes", "4", "--threads", "2", "--wsgi-file", "app.py", "--callable", "app"]
11 changes: 10 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import mysql.connector
import logging
import requests
from werkzeug.wsgi import FileWrapper
import json

app = Flask(__name__)
Expand Down Expand Up @@ -128,7 +129,15 @@ def downloadFile(packageId, objectName):
}]
}
requests.post(url, json=payload, headers={"Content-Type": "application/json"})
return send_file(object, as_attachment=True, download_name=objectName)
file_wrapper = FileWrapper(object)
headers = {
'Content-Disposition': 'attachment; filename="{}"'.format(objectName)
}
response = Response(file_wrapper,
mimetype='application/octet-stream',
direct_passthrough=True,
headers=headers)
return response
except S3Error as err:
logger.error(err)
return err
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Changelog

## Release 3.4 (10/3/2024)

Brief summary of what's in this release:
- GA download event added

### Breaking changes
None

### Non-breaking changes
None

Just a place to keep track of things that have changed in the code that we may want to pay special attention to when smoke testing, etc.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ boto3
flask-cors
mysql-connector-python
requests
gunicorn
uwsgi

0 comments on commit a5a5940

Please sign in to comment.