This commit is contained in:
insanity@loafle.com 2017-05-23 11:13:46 +09:00
parent ce344d6f50
commit 1b09bf2c49

View File

@ -3,12 +3,12 @@ package long_poller_go
import (
cm "loafle.com/overflow/agent_api/config_manager"
//pb "loafle.com/overflow/crawler_go/grpc" //temp
"loafle.com/overflow/agent_api/messages"
s "loafle.com/overflow/scheduler_go"
"log"
"strconv"
"sync"
"time"
"loafle.com/overflow/agent_api/messages"
)
const (
@ -90,6 +90,7 @@ func (p *Poller) stop() {
}
var once1 sync.Once
func (p *Poller) polling(agentId string) {
go func() {
@ -97,7 +98,6 @@ func (p *Poller) polling(agentId string) {
time.Sleep(time.Second * 20)
once1.Do(func() {
newTask := messages.AgentTask{}
@ -109,9 +109,6 @@ func (p *Poller) polling(agentId string) {
p.taskCh <- newTask
})
/*
addr := p.gconf.Central.Address + ":" + string(p.gconf.Central.Port)
conn, err := grpc.Dial(addr, grpc.WithInsecure())