diff --git a/django_project/gap/migrations/0042_alter_datasourcefilecache_size.py b/django_project/gap/migrations/0042_alter_datasourcefilecache_size.py new file mode 100644 index 00000000..72e06872 --- /dev/null +++ b/django_project/gap/migrations/0042_alter_datasourcefilecache_size.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.7 on 2024-12-15 19:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gap', '0041_preferences_api_use_x_accel_redirect_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='datasourcefilecache', + name='size', + field=models.PositiveBigIntegerField(default=0), + ), + ] diff --git a/django_project/gap/models/dataset.py b/django_project/gap/models/dataset.py index da01193f..257be3e4 100644 --- a/django_project/gap/models/dataset.py +++ b/django_project/gap/models/dataset.py @@ -174,7 +174,7 @@ class DataSourceFileCache(models.Model): null=True, blank=True ) - size = models.PositiveIntegerField(default=0) + size = models.PositiveBigIntegerField(default=0) class Meta: """Meta class for DataSourceFileCache.""" diff --git a/django_project/gap/models/preferences.py b/django_project/gap/models/preferences.py index ebfc7616..d23ee41d 100644 --- a/django_project/gap/models/preferences.py +++ b/django_project/gap/models/preferences.py @@ -192,7 +192,7 @@ def user_file_s3_transfer_config() -> TransferConfig: conf = Preferences.load().user_file_uploader_config return TransferConfig( multipart_chunksize=( - conf.get('default_block_size', 500) * 1024 * 1024 + conf.get('default_block_size', 500 * 1024 * 1024) ), use_threads=True, max_concurrency=( diff --git a/django_project/gap_api/migrations/0006_alter_userfile_size.py b/django_project/gap_api/migrations/0006_alter_userfile_size.py new file mode 100644 index 00000000..a4e32b41 --- /dev/null +++ b/django_project/gap_api/migrations/0006_alter_userfile_size.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.7 on 2024-12-15 19:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gap_api', '0005_userfile'), + ] + + operations = [ + migrations.AlterField( + model_name='userfile', + name='size', + field=models.PositiveBigIntegerField(default=0), + ), + ] diff --git a/django_project/gap_api/models/user_file.py b/django_project/gap_api/models/user_file.py index ddb9d388..28da9080 100644 --- a/django_project/gap_api/models/user_file.py +++ b/django_project/gap_api/models/user_file.py @@ -38,7 +38,7 @@ class UserFile(models.Model): editable=False, blank=True ) - size = models.IntegerField(default=0) + size = models.PositiveBigIntegerField(default=0) def _calculate_hash(self): """Calculate hash from query params."""