|
@@ -80,7 +80,7 @@ func (epm *esProxyManager) GetProxy(ctx context.Context, queryLevel int) (*httpu
|
|
|
if queryLevel+int(epm.esStatus) > 2 {
|
|
|
return nil, fmt.Errorf("server is busy")
|
|
|
}
|
|
|
- //epm.Status()
|
|
|
+ g.Log().Debugf(ctx, "esProxyManager pool %+v", epm.Status())
|
|
|
select {
|
|
|
case <-epm.getPool(queryLevel):
|
|
|
c := <-epm.proxyPool
|
|
@@ -110,10 +110,10 @@ func (epm *esProxyManager) getPool(queryLevel int) chan struct{} {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (epm *esProxyManager) Status() {
|
|
|
- g.Dump(map[string]interface{}{
|
|
|
+func (epm *esProxyManager) Status() map[string]interface{} {
|
|
|
+ return map[string]interface{}{
|
|
|
"simple": len(epm.simpleQueryPool),
|
|
|
"aggs": len(epm.aggsQueryPool),
|
|
|
"complex": len(epm.complexQueryPool),
|
|
|
- })
|
|
|
+ }
|
|
|
}
|