fmt.Printf("Serving on port %d...\n", port)\r
addr := fmt.Sprintf(":%d", port)\r
for true {\r
- err := http.ListenAndServe(addr, nil)\r
- if err == nil {\r
- fmt.Println("got it!")\r
- }\r
+ http.ListenAndServe(addr, nil)\r
time.Sleep(100*time.Millisecond)\r
}\r
}\r
\r
fmt.Printf("Request #%d: %s\n", request_id, res.Status)\r
\r
- if res.StatusCode < 500 {\r
+ // undeliverables requests will still live in the database,\r
+ // but we can clear out the 200 ones for sure\r
+ if res.StatusCode == 200 {\r
successfulRequests = append(successfulRequests, request_id)\r
}\r
}\r