Class: Textus::Doctor::Check::RefreshLocks
- Inherits:
-
Textus::Doctor::Check
- Object
- Textus::Doctor::Check
- Textus::Doctor::Check::RefreshLocks
- Defined in:
- lib/textus/doctor/check/refresh_locks.rb
Overview
Lists per-key refresh lock files under <store.root>/.locks/ whose recorded PID is no longer running. These are forensic artifacts only: Refresh::Lock uses flock(2), which the kernel releases on process death, so stale files do not block subsequent acquires. The check exists to let users clean up clutter and notice unexpected accumulation (e.g. a refresh path that crashes repeatedly).
Instance Method Summary collapse
Methods inherited from Textus::Doctor::Check
Constructor Details
This class inherits a constructor from Textus::Doctor::Check
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 |
# File 'lib/textus/doctor/check/refresh_locks.rb', line 11 def call dir = File.join(store.root, ".locks") return [] unless File.directory?(dir) Dir.glob(File.join(dir, "*.lock")).filter_map { |path| inspect_lock(path) } end |