data_sender
This commit is contained in:
		
							parent
							
								
									625bfc3a89
								
							
						
					
					
						commit
						4f64a4a915
					
				| @ -6,6 +6,7 @@ import ( | |||||||
| 
 | 
 | ||||||
| 	"context" | 	"context" | ||||||
| 	"encoding/json" | 	"encoding/json" | ||||||
|  | 	"fmt" | ||||||
| 	pb "loafle.com/overflow/crawler_go/grpc" | 	pb "loafle.com/overflow/crawler_go/grpc" | ||||||
| 	"loafle.com/overflow/cron_go" | 	"loafle.com/overflow/cron_go" | ||||||
| 	q "loafle.com/overflow/queue_go" | 	q "loafle.com/overflow/queue_go" | ||||||
| @ -104,12 +105,15 @@ func saveFailedData(datas []*Data) { | |||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			log.Println(err) | 			log.Println(err) | ||||||
| 		} | 		} | ||||||
|  | 		if bytes != nil { | ||||||
|  | 			fmt.Println("write : ", string(bytes)) | ||||||
| 			_, err = file.Write(bytes) | 			_, err = file.Write(bytes) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				log.Println(err) | 				log.Println(err) | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| func tempFile() (*os.File, error) { | func tempFile() (*os.File, error) { | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user