Description This is not async-safe:
class BranchSettingMixin :
"""
A mixin to manage a module store's branch setting.
The order of override is (from higher precedence to lower):
1. thread-specific setting temporarily set using the branch_setting contextmanager
2. the return value of the branch_setting_func passed into this mixin's init method
3. the default branch setting being ModuleStoreEnum.Branch.published_only
"""
def __init__ (self , * args , ** kwargs ):
"""
:param branch_setting_func: a function that returns the default branch setting for this object.
If not specified, ModuleStoreEnum.Branch.published_only is used as the default setting.
"""
self .default_branch_setting_func = kwargs .pop (
'branch_setting_func' ,
lambda : ModuleStoreEnum .Branch .published_only
)
super ().__init__ (* args , ** kwargs )
# cache the branch setting on a local thread to support a multi-threaded environment
self .thread_cache = threading .local ()
Reactions are currently unavailable
You can’t perform that action at this time.
This is not async-safe:
openedx-platform/xmodule/modulestore/draft_and_published.py
Lines 20 to 41 in 628c980