diff --git a/data_sender.go b/data_sender.go index cd97eff..d6f045d 100644 --- a/data_sender.go +++ b/data_sender.go @@ -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,9 +105,12 @@ func saveFailedData(datas []*Data) { if err != nil { log.Println(err) } - _, err = file.Write(bytes) - if err != nil { - log.Println(err) + if bytes != nil { + fmt.Println("write : ", string(bytes)) + _, err = file.Write(bytes) + if err != nil { + log.Println(err) + } } } }