mirror of
https://github.com/langgenius/dify.git
synced 2026-02-23 19:37:59 +08:00
Remove worker idle/active callbacks that caused severe lock contention. Instead, use sampling-based monitoring where worker states are queried on-demand during scaling decisions. This eliminates the performance bottleneck caused by workers acquiring locks 10+ times per second. Changes: - Remove callback parameters from Worker class - Add properties to expose worker idle state directly - Update WorkerPool to query worker states without callbacks - Maintain scaling functionality with better performance