Remove stale lock entries (dead PIDs) from the database. Args: lock_file_path: Path to the lock file Returns: True if stale lock was broken, False otherwise
(lock_file_path: Path)
| 105 | |
| 106 | |
| 107 | def break_stale_lock(lock_file_path: Path) -> bool: |
| 108 | """ |
| 109 | Remove stale lock entries (dead PIDs) from the database. |
| 110 | |
| 111 | Args: |
| 112 | lock_file_path: Path to the lock file |
| 113 | |
| 114 | Returns: |
| 115 | True if stale lock was broken, False otherwise |
| 116 | """ |
| 117 | db = get_lock_database(lock_file_path) |
| 118 | lock_name = str(lock_file_path) |
| 119 | return db.break_stale_lock(lock_name) |
| 120 | |
| 121 | |
| 122 | class FileLock: |