Skip to content

Commit

Permalink
Modified userstat where it passes in the trip_key as an input instead…
Browse files Browse the repository at this point in the history
… of hardcoding analysis/confirmed_trip
  • Loading branch information
TeachMeTW authored and shankari committed Jan 6, 2025
1 parent e19af35 commit c77c5c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emission/analysis/result/user_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def get_and_store_user_stats(user_id: str, trip_key: str) -> None:
end_ts_result = ts.get_first_value_for_field(trip_key, "data.end_ts", pymongo.DESCENDING)
end_ts = None if end_ts_result == -1 else end_ts_result

total_trips = ts.find_entries_count(key_list=["analysis/confirmed_trip"])
total_trips = ts.find_entries_count(key_list=[trip_key])
labeled_trips = ts.find_entries_count(
key_list=["analysis/confirmed_trip"],
key_list=[trip_key],
extra_query_list=[{'data.user_input': {'$ne': {}}}]
)

Expand Down

0 comments on commit c77c5c5

Please sign in to comment.