mirror of
https://github.com/Xevion/vastly.git
synced 2025-12-05 23:16:48 -06:00
adjust latency periods, display form for -1
This commit is contained in:
@@ -162,9 +162,11 @@ func (l *LatencyQueue) Start(ctx context.Context) {
|
||||
|
||||
// Store the result in Redis
|
||||
value := "timeout"
|
||||
expiration := time.Hour*24 + time.Minute*time.Duration(rand.Intn(60*8))
|
||||
expiration := time.Hour*8 + time.Minute*time.Duration(rand.Intn(60*8))
|
||||
if success {
|
||||
value = results.AvgRtt.String()
|
||||
} else {
|
||||
expiration = time.Hour*4 + time.Minute*time.Duration(rand.Intn(60*4))
|
||||
}
|
||||
|
||||
l.logger.Debugw("Ping Result", "ip", ip, "latency", value)
|
||||
|
||||
@@ -30,7 +30,9 @@ export default function Offer({
|
||||
<span className="text-sm">{mb_to_gb(offer.gpu_ram)} GB</span>
|
||||
</span>
|
||||
<span className="relative top-3 text-base">
|
||||
<span>{latency ?? "?"}</span>
|
||||
<span className={latency == -1 ? "text-red-500" : ""}>
|
||||
{latency == -1 ? "??" : latency}
|
||||
</span>
|
||||
<span className="text-xs select-none">ms</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user