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
(cherry picked from commit 93d445dfdd)
This commit is contained in:
parent
402d2f9a98
commit
851b45f726
1 changed files with 14 additions and 0 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue