Add check to see if instances can fetch videos.

This commit is contained in:
Kavin
2023-07-02 00:41:09 +01:00
parent fab1a5b01c
commit 53e860be10
+10
View File
@@ -183,6 +183,16 @@ func monitorInstances() {
}
}
// check if instance can fetch videos
resp, err = http.Get(ApiUrl + "/streams/jNQXAC9IVRw")
if err != nil {
log.Print(err)
continue
}
if resp.StatusCode != 200 {
continue
}
instances = append(instances, Instance{
Name: strings.TrimSpace(split[0]),
ApiUrl: ApiUrl,