let's make it even better

This commit is contained in:
Laura Klünder 2024-12-29 23:30:10 +01:00
parent 7cfc40c5bf
commit 3cae4ede1d

View file

@ -494,7 +494,7 @@ def get_load(request):
current_values[load_group_id] += beacon.num_clients current_values[load_group_id] += beacon.num_clients
result = { result = {
pk: round((min(1.0, (current_values[pk] / (max_value*0.85))-0.1) if max_value else 0), 1) pk: round((min(1.0, (current_values[pk] / max_value)**2/0.5) if max_value else 0), 1)
for pk, max_value in max_values.items() for pk, max_value in max_values.items()
} }
cache.set('mapdata:get_load', result, 300) cache.set('mapdata:get_load', result, 300)