Skip to content

Commit

Permalink
bugfixes and blue-green deployment feature implementation (#1017)
Browse files Browse the repository at this point in the history
* fixed bug with pagination in the quality assurance list.

* yield should return an empty string

* implemented blue-green deployment strategy for zero-downtime deployments.
  • Loading branch information
takinbo authored Oct 26, 2024
1 parent a3213d8 commit f0cb4d9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apollo/locations/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class LocationService(Service):
def export_list(self, query):
headers = []
if query.count() == 0:
yield None
yield ""
return

location_set = query.first().location_set
Expand Down
2 changes: 1 addition & 1 deletion apollo/participants/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ParticipantService(Service):

def export_list(self, query):
if query.count() == 0:
yield None
yield ""
return

participant = query.first()
Expand Down
2 changes: 1 addition & 1 deletion apollo/submissions/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SubmissionService(Service):

def export_list(self, query, include_qa=False, include_group_timestamps=False):
if query.count() == 0:
yield None
yield ""
return

submission = query.first()
Expand Down
2 changes: 1 addition & 1 deletion apollo/submissions/views_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ def quality_assurance_list(form_id):
breadcrumbs = [_("Quality Assurance"), form.name]
filter_class = filters.generate_quality_assurance_filter(event, form)

data = request.args.to_dict()
data = request.args.to_dict(flat=False)
data["form_id"] = str(form.id)
page = int(data.pop("page", [1])[0])
loc_types = displayable_location_types(is_administrative=True, location_set_id=g.event.location_set_id)
Expand Down
7 changes: 6 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
- ./.env
command: ['flask', 'db', 'upgrade']

web:
web-blue: &web
restart: always
build:
context: .
Expand Down Expand Up @@ -70,6 +70,11 @@ services:
- "5000:5000"
command: ['gunicorn', '-c', 'gunicorn.py', 'apollo.runner']

web-green:
<<: *web
ports:
- "5001:5000"

worker:
restart: always
build:
Expand Down

0 comments on commit f0cb4d9

Please sign in to comment.