Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new AWS_S3_CLIENT_CONFIG parameter
Browse files Browse the repository at this point in the history
danlamanna committed Jul 18, 2024
1 parent 4c7149d commit 5fb6f57
Showing 2 changed files with 9 additions and 15 deletions.
13 changes: 0 additions & 13 deletions stade/core/storage_backends.py

This file was deleted.

11 changes: 9 additions & 2 deletions stade/settings.py
Original file line number Diff line number Diff line change
@@ -77,13 +77,11 @@ class TestingConfiguration(StadeMixin, TestingBaseConfiguration):


class ProductionConfiguration(StadeMixin, ProductionBaseConfiguration):
DEFAULT_FILE_STORAGE = 'stade.core.storage_backends.TimeoutS3Boto3Storage'
# TODO: What about this?
EMAIL_TIMEOUT = 10


class HerokuProductionConfiguration(StadeMixin, HerokuProductionBaseConfiguration):
DEFAULT_FILE_STORAGE = 'stade.core.storage_backends.TimeoutS3Boto3Storage'
# TODO: What about this?
EMAIL_TIMEOUT = 10
CACHES = {
@@ -94,3 +92,12 @@ class HerokuProductionConfiguration(StadeMixin, HerokuProductionBaseConfiguratio
}

SENTRY_TRACES_SAMPLE_RATE = 0.01 # sample 1% of requests for performance monitoring

@staticmethod
def mutate_configuration(configuration: ComposedConfiguration) -> None:
configuration.AWS_S3_CLIENT_CONFIG = Config(
connect_timeout=3,
read_timeout=10,
retries={"max_attempts": 5},
signature_version=configuration.AWS_S3_SIGNATURE_VERSION,
)

0 comments on commit 5fb6f57

Please sign in to comment.