mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-08-17 10:20:35 +03:00
address comments left by @StanGirard on #2437 (feat(analytics): rely on sql rather that python loop for brains);
This commit is contained in:
parent
f0ad664673
commit
c3a042647e
@ -9,7 +9,6 @@ from modules.brain.service.brain_user_service import BrainUserService
|
||||
|
||||
brain_user_service = BrainUserService()
|
||||
|
||||
|
||||
class Analytics:
|
||||
def __init__(self):
|
||||
supabase_client = get_supabase_client()
|
||||
@ -42,7 +41,7 @@ class Analytics:
|
||||
all_dates = [start_date + timedelta(days=i) for i in range(graph_range)]
|
||||
|
||||
for date in all_dates:
|
||||
usage_per_day[date] += 0
|
||||
pass
|
||||
|
||||
usages = sorted(
|
||||
[
|
||||
@ -53,4 +52,4 @@ class Analytics:
|
||||
key=lambda usage: usage.date,
|
||||
)
|
||||
|
||||
return BrainsUsages(usages=usages)
|
||||
return BrainsUsages(usages=usages)
|
Loading…
Reference in New Issue
Block a user