Skip to content

Commit bf8b822

Browse files
committed
query mapping_sessions table instead of results table
1 parent 835f113 commit bf8b822

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mapswipe_workers/mapswipe_workers/generate_stats/generate_stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ def get_recent_projects(hours: int = 3):
1111
pg_db = auth.postgresDB()
1212
query_insert_results = """
1313
select project_id
14-
from results
14+
from mapping_sessions
1515
-- Using timestamp attribute here which is set for all projects
1616
-- and also represents the start_time for newer projects.
1717
-- "Old" projects have no start_time attribute.
1818
-- There is an index defined on "timestamp".
19-
where "timestamp" >= %(timestamp)s
19+
where start_time >= %(timestamp)s
2020
group by project_id
2121
"""
2222
timestamp = (dt.datetime.utcnow() - dt.timedelta(hours=hours)).isoformat()[

0 commit comments

Comments
 (0)