线程安全地获取或创建任务日志锁
(task_uuid: str)
| 55 | |
| 56 | |
| 57 | def _get_log_lock(task_uuid: str) -> threading.Lock: |
| 58 | """线程安全地获取或创建任务日志锁""" |
| 59 | if task_uuid not in _log_locks: |
| 60 | with _meta_lock: |
| 61 | if task_uuid not in _log_locks: |
| 62 | _log_locks[task_uuid] = threading.Lock() |
| 63 | return _log_locks[task_uuid] |
| 64 | |
| 65 | |
| 66 | def _get_batch_lock(batch_id: str) -> threading.Lock: |
no outgoing calls
no test coverage detected