prints routing table after removing route

This commit is contained in:
Travis
2013-01-02 09:35:06 -08:00
parent 63f1211979
commit b49bfa7296

View File

@@ -98,9 +98,11 @@ func ProxyFunc(w http.ResponseWriter, req *http.Request) {
if len(route.Destinations) > 1 {
fmt.Println("It's a network error, removing this destination from routing table.")
route.Destinations = append(route.Destinations[:destIndex], route.Destinations[destIndex+1:]...)
fmt.Println("New routing table:", routingTable)
return
} else {
fmt.Println("It's a network error and no other destinations available so we're going to start new task.")
route.Destinations = append(route.Destinations[:destIndex], route.Destinations[destIndex+1:]...)
}
// start new worker
payload := map[string]interface{}{
@@ -115,7 +117,7 @@ func ProxyFunc(w http.ResponseWriter, req *http.Request) {
fmt.Println("Couldn't marshal json!", err)
return
}
timeout := time.Second * 300
timeout := time.Second * 120
task := worker.Task{
CodeName: route.CodeName,
Payload: string(jsonPayload),