Deleted dead code
This commit is contained in:
parent
a13b29d957
commit
79a27dbc4b
@ -254,37 +254,6 @@ func StartInstancePoll(instancereport InstanceReport, reportPostChan chan Report
|
||||
instanceReportChan <- InstanceReport{instancereport.endpoint, resp.StatusCode, min_id, numposts}
|
||||
}
|
||||
|
||||
/*
|
||||
func StartGetPeers(endpoint string, instanceReportChan chan InstanceReport) {
|
||||
var newpeers []string
|
||||
|
||||
api_peers := "https://" + endpoint + "/api/v1/instance/peers"
|
||||
resp, err := http.Get(api_peers)
|
||||
if err != nil {
|
||||
instanceReportChan <- InstanceReport{endpoint, NO_CONNECTION, "", 0}
|
||||
return
|
||||
// os.Exit(1)
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
|
||||
err = json.Unmarshal([]byte(body), &newpeers)
|
||||
if err != nil {
|
||||
fmt.Println("Unmarshal 1");
|
||||
log.Fatal(err)
|
||||
instanceReportChan <- InstanceReport{endpoint, endpoint, UNMARSHAL_ERROR, "", 0}
|
||||
return
|
||||
}
|
||||
|
||||
for _, newpeer := range newpeers {
|
||||
var q InstanceReport
|
||||
q.endpoint = newpeer
|
||||
q.status = NEW_INSTANCE
|
||||
instanceReportChan <- q
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
func DeferPollRun(instancereport InstanceReport, runninginstances *[]RunningInstance, instanceReportChan chan InstanceReport, reportPostChan chan ReportPost) {
|
||||
|
||||
delay := 10
|
||||
@ -356,8 +325,6 @@ func NewInstance(endpoint string, runninginstances *[]RunningInstance, instanceR
|
||||
newinstancereport.min_id = ""
|
||||
newinstancereport.numposts = 0
|
||||
go StartInstancePoll(newinstancereport, reportPostChan, instanceReportChan)
|
||||
// fmt.Println("Temporarily disabled Peer Hunting")
|
||||
// go StartGetPeers(endpoint, instanceReportChan)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user