data_sender

This commit is contained in:
insanity@loafle.com 2017-04-27 10:20:08 +09:00
parent 87f6a06831
commit 34bdb1d8af

View File

@ -16,7 +16,7 @@ import (
const ( const (
CENTRAL_ADDR = "127.0.0.1:50052" CENTRAL_ADDR = "127.0.0.1:50052"
FILE_PATH = "/home/insanity/data/data.tmp" FILE_PATH = "/overflow/tmp/data.tmp"
SENDER_ID = "OVERFLOW_DATA_SENDER" SENDER_ID = "OVERFLOW_DATA_SENDER"
DEFAULT_INTERVAL = uint64(5) DEFAULT_INTERVAL = uint64(5)
) )
@ -81,7 +81,6 @@ func (ds *DataSender) send(data []*Data) {
ds.removeFailed() ds.removeFailed()
} }
return
conn, err := grpc.Dial(CENTRAL_ADDR, grpc.WithInsecure()) conn, err := grpc.Dial(CENTRAL_ADDR, grpc.WithInsecure())
if err != nil { if err != nil {
ds.saveFailedData(data) ds.saveFailedData(data)