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

Function clean_stale

ci/util/lock_admin.py:96–113  ·  view source on GitHub ↗

Clean only stale locks (safe operation).

(cache_dir: Path)

Source from the content-addressed store, hash-verified

94
95
96def clean_stale(cache_dir: Path) -> int:
97 """Clean only stale locks (safe operation)."""
98 print(f"🧹 Cleaning stale locks...")
99
100 # Clean from database
101 db = get_lock_database()
102 db_cleaned = db.cleanup_stale_locks()
103
104 # Clean from cache_dir (legacy files)
105 cache_cleaned = cleanup_stale_locks(cache_dir)
106
107 total = db_cleaned + cache_cleaned
108 if total > 0:
109 print(f"✅ Cleaned {total} stale lock(s)")
110 else:
111 print("✅ No stale locks found")
112
113 return 0
114
115
116def force_unlock_all(cache_dir: Path) -> int:

Callers 1

mainFunction · 0.85

Calls 4

get_lock_databaseFunction · 0.90
cleanup_stale_locksFunction · 0.90
cleanup_stale_locksMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected