Skip to content

Commit e1ddca4

Browse files
authored
Merge pull request #598 from mapswipe/dev
Dev - fix get recent project ids
2 parents 61e800c + b2ea4b2 commit e1ddca4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

mapswipe_workers/mapswipe_workers/generate_stats/generate_stats.py

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

0 commit comments

Comments
 (0)