Increase timeout to 3 seconds

The status bot keeps spamming Matrix with bogus messages about people's personal websites being down because they're hosted on other servers and sometimes take longer than 1 second to fetch. 3 seconds should be enough to avoid this.
This commit is contained in:
Anthony Wang 2024-05-24 09:59:20 -05:00
parent 6f551cd1d9
commit 8f83a8cae7
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ

View file

@ -60,7 +60,7 @@ func index(w http.ResponseWriter, r *http.Request) {
}
// get service status'
timeout := time.Second
timeout := 3 * time.Second
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
data := scanner.CheckServiceBatch(ctx, config.Service)