Skip lock acquisition in CrewTrainingHandler.load when file is missing (#5935)
Every agent kickoff calls _use_trained_data, which calls CrewTrainingHandler(...).load(). Since #4827 wrapped load() in store_lock, that means every kickoff acquires the cross-process (Redis-backed when REDIS_URL is set) lock even on deployments that never train and have no trained-agents file on disk. Move the missing/empty-file short-circuit above store_lock so the lock is only acquired when there is actually a file to read. save() and the real read remain locked.
V
Vini Brasil committed
32f5e74449ae2b3230d243ce2ed8a0b501a21b0a
Parent: bad64b1
Committed by GitHub <noreply@github.com>
on 5/26/2026, 3:52:31 PM