Skip to content

Commit

Permalink
fix: storage full notification on create
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaquiery committed Jun 25, 2024
1 parent 60755d0 commit 36eb56d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend_django/config/settings_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Build paths inside the project like this: BASE_DIR / 'subdir'.
import os

API_VERSION = "2.1.47"
API_VERSION = "2.1.48"

try:
USER_ACTIVATION_TOKEN_EXPIRY_S = int(os.environ.get("DJANGO_USER_ACTIVATION_TOKEN_EXPIRY_S"))
Expand Down
6 changes: 5 additions & 1 deletion backend_django/galv/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,9 @@ def handle_upload_parquets(file, data, request):
partition.parquet_file = upload
partition.save()
except StorageError as e:
return error_response(f"Error uploading file to storage: {e}")
file.state = FileState.AWAITING_STORAGE
file.save()
return error_response(f"Error uploading file to storage: {e}", status=507)
return Response(ParquetPartitionSerializer(partition, context={'request': request}).data)

def handle_upload_complete(file, data):
Expand Down Expand Up @@ -1254,6 +1256,8 @@ def reimport(self, request, pk = None):
return error_response('Requested file not found')
file.state = FileState.RETRY_IMPORT
file.storage_urls = []
if file.png is not None:
file.png.delete()
file.save()
for dataset in file.parquet_partitions.all():
dataset.delete()
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
project = 'Galv'
copyright = '2023, Oxford RSE'
author = 'Oxford RSE'
release = '2.1.47'
release = '2.1.48'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/tags.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["v2.1.47","main"]
["v2.1.48","main"]

0 comments on commit 36eb56d

Please sign in to comment.