线程安全地获取或创建批量任务日志锁
(batch_id: str)
| 64 | |
| 65 | |
| 66 | def _get_batch_lock(batch_id: str) -> threading.Lock: |
| 67 | """线程安全地获取或创建批量任务日志锁""" |
| 68 | if batch_id not in _batch_locks: |
| 69 | with _meta_lock: |
| 70 | if batch_id not in _batch_locks: |
| 71 | _batch_locks[batch_id] = threading.Lock() |
| 72 | return _batch_locks[batch_id] |
| 73 | |
| 74 | |
| 75 | class TaskManager: |
no outgoing calls
no test coverage detected