Add pipeline status lock function for legacy compatibility

- Add get_pipeline_status_lock function
- Return NamespaceLock for consistency
- Support workspace parameter
- Enable logging option
- Legacy code compatibility
This commit is contained in:
yangdx 2025-11-25 18:24:39 +08:00
parent d2cd1c0722
commit 93d445dfdd

View file

@ -1683,3 +1683,17 @@ def get_default_workspace() -> str:
"""
global _default_workspace
return _default_workspace
def get_pipeline_status_lock(
enable_logging: bool = False, workspace: str = None
) -> NamespaceLock:
"""Return unified storage lock for pipeline status data consistency.
This function is for compatibility with legacy code only.
"""
global _default_workspace
actual_workspace = workspace if workspace else _default_workspace
return get_namespace_lock(
"pipeline_status", workspace=actual_workspace, enable_logging=enable_logging
)