MCPcopy Create free account
hub / github.com/FastLED/FastLED / force_unlock_all

Function force_unlock_all

ci/util/lock_admin.py:116–140  ·  view source on GitHub ↗

Force break all locks (destructive operation).

(cache_dir: Path)

Source from the content-addressed store, hash-verified

114
115
116def force_unlock_all(cache_dir: Path) -> int:
117 """Force break all locks (destructive operation)."""
118 print(f"⚠️ WARNING: Forcing unlock of ALL locks")
119 print("This will break locks from active processes!")
120
121 response = input("Are you sure? (yes/no): ")
122
123 if response.lower() != "yes":
124 print("Cancelled")
125 return 1
126
127 # Force break all in database
128 db = get_lock_database()
129 db_broken = db.force_break_all()
130
131 # Force break in cache_dir (legacy files)
132 cache_broken = force_unlock_cache(cache_dir)
133
134 total = db_broken + cache_broken
135 if total > 0:
136 print(f"✅ Broke {total} lock(s)")
137 else:
138 print("✅ No locks found")
139
140 return 0
141
142
143def check_lock(lock_name: str) -> int:

Callers 1

mainFunction · 0.85

Calls 4

get_lock_databaseFunction · 0.90
force_unlock_cacheFunction · 0.90
force_break_allMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected