File tree Expand file tree Collapse file tree
src/main/java/eu/openanalytics/containerproxy/stat/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import eu .openanalytics .containerproxy .event .ProxyStopEvent ;
2727import eu .openanalytics .containerproxy .event .UserLoginEvent ;
2828import eu .openanalytics .containerproxy .event .UserLogoutEvent ;
29+ import eu .openanalytics .containerproxy .model .runtime .ProxyStatus ;
2930import eu .openanalytics .containerproxy .model .spec .ProxySpec ;
3031import eu .openanalytics .containerproxy .service .ProxyService ;
3132import eu .openanalytics .containerproxy .service .session .ISessionService ;
@@ -148,7 +149,7 @@ public void onAuthFailedEvent(AuthFailedEvent event) {
148149 */
149150 private void updateCachedProxyCount () {
150151 for (ProxySpec spec : proxyService .getProxySpecs (null , true )) {
151- Integer count = proxyService .getProxies (p -> p .getSpec ().getId ().equals (spec .getId ()), true ).size ();
152+ Integer count = proxyService .getProxies (p -> p .getSpec ().getId ().equals (spec .getId ()) && p . getStatus () == ProxyStatus . Up , true ).size ();
152153 proxyCountCache .put (spec .getId (), count );
153154 logger .debug (String .format ("Running proxies count for spec %s: %s " , spec .getId (), count ));
154155 }
You can’t perform that action at this time.
0 commit comments