fix: In multi-servers node , no workers found prompt without @DesignateServer in not conform server node

This commit is contained in:
raylua 2023-02-17 19:27:08 +08:00
parent 3f7d4328e9
commit 8c32c775da

View File

@ -76,6 +76,7 @@ public class WorkerClusterQueryService {
* @param appId appId
* @return alive workers
*/
@DesignateServer
public List<WorkerInfo> getAllAliveWorkers(Long appId) {
List<WorkerInfo> workers = Lists.newLinkedList(getWorkerInfosByAppId(appId).values());
workers.removeIf(WorkerInfo::timeout);