Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/release/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ to modify moderation event `status`.
* [OSDEV-1347](https://opensupplyhub.atlassian.net/browse/OSDEV-1347) - Create GET request for `v1/moderation-events/{moderation_id}` endpoint.
* Update `/v1/production-locations/{os_id}` endpoint to return a single object instead of multiple objects. Also, add unit tests for the `ProductionLocationsViewSet`.
* The RDS instance has been upgraded as follows: for `production` and `preprod`, it is now `db.m6in.8xlarge`, and for `test`, it has been upgraded to `db.t3.xlarge`.
* [OSDEV-1467](https://opensupplyhub.atlassian.net/browse/OSDEV-1467) - Implemented disabling endpoint `POST /api/facilities/?public=true&create=true` during the release process . It is raising an error message with status code 503.

### Architecture/Environment changes
* Increased the memory for the Dedupe Hub instance from 8GB to 12GB in the `production` and `pre-prod` environments to reduce the risk of container overload and minimize the need for reindexing in the future.
Expand Down
6 changes: 6 additions & 0 deletions src/django/api/views/facility/facilities_view_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from contricleaner.lib.exceptions.handler_not_set_error \
import HandlerNotSetError

from api.exceptions import ServiceUnavailableException
from api.helpers.helpers import validate_workers_count
from oar.settings import (
MAX_ATTACHMENT_SIZE_IN_BYTES,
Expand Down Expand Up @@ -576,6 +577,11 @@ def create(self, request):
""" # noqa
# Adding the @permission_classes decorator was not working so we
# explicitly invoke our custom permission class.
if switch_is_active('disable_list_uploading'):
block_message = ('Open Supply Hub is undergoing maintenance and '
'not accepting new data at the moment. Please '
'try again in a few minutes.')
raise ServiceUnavailableException(block_message)
if not IsRegisteredAndConfirmed().has_permission(request, self):
return Response(status=status.HTTP_401_UNAUTHORIZED)
if not flag_is_active(request._request,
Expand Down