data_sender

This commit is contained in:
insanity@loafle.com 2017-04-26 18:48:01 +09:00
parent 625bfc3a89
commit 4f64a4a915

View File

@ -6,6 +6,7 @@ import (
"context"
"encoding/json"
"fmt"
pb "loafle.com/overflow/crawler_go/grpc"
"loafle.com/overflow/cron_go"
q "loafle.com/overflow/queue_go"
@ -104,11 +105,14 @@ func saveFailedData(datas []*Data) {
if err != nil {
log.Println(err)
}
if bytes != nil {
fmt.Println("write : ", string(bytes))
_, err = file.Write(bytes)
if err != nil {
log.Println(err)
}
}
}
}
func tempFile() (*os.File, error) {