From c8c981cc9c43be6d0acd8d85e20c85a8da1a0789 Mon Sep 17 00:00:00 2001 From: Newnius Date: Thu, 13 Jun 2019 11:13:55 +0800 Subject: [PATCH] debug --- src/resource_pool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resource_pool.go b/src/resource_pool.go index 0009734..619d3bf 100644 --- a/src/resource_pool.go +++ b/src/resource_pool.go @@ -8,6 +8,7 @@ import ( "log" "math/rand" "strconv" + "fmt" ) type ResourcePool struct { @@ -137,6 +138,7 @@ func (pool *ResourcePool) acquireNetwork() string { pool.networkMu.Lock() defer pool.networkMu.Unlock() var network string + fmt.Println(pool.networksFree) if len(pool.networksFree) == 0 { for { for { @@ -148,6 +150,7 @@ func (pool *ResourcePool) acquireNetwork() string { v := url.Values{} v.Set("name", network) resp, err := doRequest("POST", "http://yao-agent-master:8000/network_create", strings.NewReader(v.Encode()), "application/x-www-form-urlencoded", "") + fmt.Print(resp, err) if err != nil { log.Println(err.Error()) continue