diff --git a/cms/envs/common.py b/cms/envs/common.py index 41ef3f60c2..d3660edc63 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -155,9 +155,6 @@ BLOCK_STRUCTURES_SETTINGS = dict( # Maximum number of retries per task. TASK_MAX_RETRIES=5, - - # Backend storage options - PRUNING_ACTIVE=False, ) ############################ FEATURE CONFIGURATION ############################# diff --git a/cms/envs/devstack-experimental.yml b/cms/envs/devstack-experimental.yml index a25a28debc..46e6af3894 100644 --- a/cms/envs/devstack-experimental.yml +++ b/cms/envs/devstack-experimental.yml @@ -43,7 +43,6 @@ BLOCKSTORE_API_URL: http://localhost:18250/api/v1 BLOCKSTORE_PUBLIC_URL_ROOT: http://localhost:18250 BLOCK_STRUCTURES_SETTINGS: COURSE_PUBLISH_TASK_DELAY: 30 - PRUNING_ACTIVE: false TASK_DEFAULT_RETRY_DELAY: 30 TASK_MAX_RETRIES: 5 BRANCH_IO_KEY: '' diff --git a/cms/envs/test.py b/cms/envs/test.py index e856034d08..118b3f1b0c 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -95,8 +95,6 @@ STATICFILES_DIRS += [ STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineStorage' STATIC_URL = "/static/" -BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE'] = True - # Update module store settings per defaults for tests update_module_store_settings( MODULESTORE, diff --git a/lms/envs/common.py b/lms/envs/common.py index af6c93f519..e4c213e0da 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -2867,22 +2867,6 @@ BLOCK_STRUCTURES_SETTINGS = dict( # For more information, check https://github.com/openedx/edx-platform/pull/13388 and # https://github.com/openedx/edx-platform/pull/14571. TASK_MAX_RETRIES=5, - - # .. toggle_name: BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE'] - # .. toggle_implementation: DjangoSetting - # .. toggle_default: False - # .. toggle_description: When `True`, only a specified number of versions of block structure - # files are kept for each structure, and the rest are cleaned up. The number of versions that - # are kept can be specified in the `BlockStructureConfiguration`, which can be edited in - # Django Admin. The default number of versions that are kept is `5`. - # .. toggle_warning: This toggle will likely be deprecated and removed. - # .. toggle_use_cases: temporary - # .. toggle_creation_date: 2018-03-22 - # .. toggle_target_removal_date: 2018-06-22 - # .. toggle_tickets: https://github.com/openedx/edx-platform/pull/14571, - # https://github.com/openedx/edx-platform/pull/17760, - # https://openedx.atlassian.net/browse/DEPR-146 - PRUNING_ACTIVE=False, ) ################################ Bulk Email ################################### diff --git a/lms/envs/devstack-experimental.yml b/lms/envs/devstack-experimental.yml index 0e554cdd9a..71d66b2af4 100644 --- a/lms/envs/devstack-experimental.yml +++ b/lms/envs/devstack-experimental.yml @@ -61,7 +61,6 @@ BLOCKSTORE_API_URL: http://localhost:18250/api/v1 BLOCKSTORE_PUBLIC_URL_ROOT: http://localhost:18250 BLOCK_STRUCTURES_SETTINGS: COURSE_PUBLISH_TASK_DELAY: 30 - PRUNING_ACTIVE: false TASK_DEFAULT_RETRY_DELAY: 30 TASK_MAX_RETRIES: 5 BRANCH_IO_KEY: '' diff --git a/lms/envs/test.py b/lms/envs/test.py index cb55cfcfb8..4cc08fdadd 100644 --- a/lms/envs/test.py +++ b/lms/envs/test.py @@ -327,8 +327,6 @@ FILE_UPLOAD_HANDLERS = [ 'django.core.files.uploadhandler.TemporaryFileUploadHandler', ] -BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE'] = True - ########################### Server Ports ################################### # These ports are carefully chosen so that if the browser needs to diff --git a/openedx/core/djangoapps/content/block_structure/models.py b/openedx/core/djangoapps/content/block_structure/models.py index b183bb5949..8fda8ad360 100644 --- a/openedx/core/djangoapps/content/block_structure/models.py +++ b/openedx/core/djangoapps/content/block_structure/models.py @@ -255,9 +255,6 @@ class BlockStructureModel(TimeStampedModel): """ Deletes previous file versions for data_usage_key. """ - if not settings.BLOCK_STRUCTURES_SETTINGS.get('PRUNING_ACTIVE', False): - return - if num_to_keep is None: num_to_keep = config.num_versions_to_keep() diff --git a/openedx/core/djangoapps/content/block_structure/tests/test_models.py b/openedx/core/djangoapps/content/block_structure/tests/test_models.py index 08916151e7..443c722aed 100644 --- a/openedx/core/djangoapps/content/block_structure/tests/test_models.py +++ b/openedx/core/djangoapps/content/block_structure/tests/test_models.py @@ -80,7 +80,6 @@ class BlockStructureModelTestCase(TestCase): return bsm @patch('openedx.core.djangoapps.content.block_structure.models.log') - @patch.dict(settings.BLOCK_STRUCTURES_SETTINGS, {'PRUNING_ACTIVE': False}) def test_update_or_create(self, mock_log): serialized_data = 'initial data'