mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-23 17:34:17 +03:00
fixed stats_counters on system
This commit is contained in:
parent
43458cbf99
commit
adec02dc3f
@ -119,8 +119,7 @@ class StatsCounters(models.Model):
|
|||||||
max_intervals = kwargs.get('max_intervals') or 0
|
max_intervals = kwargs.get('max_intervals') or 0
|
||||||
if max_intervals > 0:
|
if max_intervals > 0:
|
||||||
count = q.count()
|
count = q.count()
|
||||||
if max_intervals < count:
|
max_intervals = max(min(max_intervals, count), 2)
|
||||||
max_intervals = count
|
|
||||||
interval = int(to - since) / max_intervals
|
interval = int(to - since) / max_intervals
|
||||||
|
|
||||||
floor = getSqlFnc('FLOOR')
|
floor = getSqlFnc('FLOOR')
|
||||||
|
Loading…
Reference in New Issue
Block a user