refactor: migrate ENABLE_COURSEWARE_INDEX and ENABLE_LIBRARY_INDEX off FEATURES-as-dict
`SearchIndexerBase.indexing_is_enabled()` read the flag via
`settings.FEATURES.get(cls.ENABLE_INDEXING_KEY, False)`, where
ENABLE_INDEXING_KEY is a per-subclass class attribute holding the flag
name ('ENABLE_COURSEWARE_INDEX' for CoursewareSearchIndexer /
CourseAboutSearchIndexer, 'ENABLE_LIBRARY_INDEX' for LibrarySearchIndexer).
Because the flag name is a class attribute rather than a quoted literal
at the call site, batch 7's reference grep never matched this reader, so
ENABLE_COURSEWARE_INDEX's migration (#38904) missed it; ENABLE_LIBRARY_INDEX
was likewise never picked up. The FeaturesProxy bridge kept it working, so
CI stayed green (the companion reader in contentstore/utils.py was already
migrated to flat `settings.ENABLE_COURSEWARE_INDEX`).
Read the dynamic class-attribute key off flat settings with
`getattr(settings, cls.ENABLE_INDEXING_KEY, False)`. Both flags are defined
in cms/envs/common.py (and set True flat in cms/envs/test.py), so the
existing indexer tests exercise the enabled path directly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> F
Feanil Patel committed
c8015bb82ad85cc0c2a4dad8beace616b14b924b
Parent: 74f8b44