feat: BLOCK_STRUCTURES_SETTINGS['PRUNING_ACTIVE'] toggle removed depr31

This commit is contained in:
Yagnesh
2023-06-17 02:31:07 +05:30
parent 0b455e0336
commit 14f90eba96
8 changed files with 0 additions and 29 deletions

View File

@@ -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 #############################

View File

@@ -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: ''

View File

@@ -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,

View File

@@ -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 ###################################

View File

@@ -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: ''

View File

@@ -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

View File

@@ -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()

View File

@@ -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'