@statsd_increment('user_activity')
def do_update_user_activity(user_profile_id: int, client_id: int, query: str, count: int, log_time: datetime.datetime) -> None:
    (activity, created) = UserActivity.objects.get_or_create(user_profile_id=user_profile_id, client_id=client_id, query=query, defaults={'last_visit': log_time, 'count': count})
    if (not created):
        activity.count += count
        activity.last_visit = log_time
        activity.save(update_fields=['last_visit', 'count'])
@statsd_increment('user_activity')
def do_update_user_activity(user_profile_id: int, client_id: int, query: str, count: int, log_time: datetime.datetime) -> None:
    (activity, created) = UserActivity.objects.get_or_create(user_profile_id=user_profile_id, client_id=client_id, query=query, defaults={'last_visit': log_time, 'count': count})
    if (not created):
        activity.count += count
        activity.last_visit = log_time
        activity.save(update_fields=['last_visit', 'count'])