Open kueda opened 4 months ago
Looked into this - in the user profile screen, we always use the GET /users/12345
endpoint, which returns these counts - so it's more of a server-side issue (@pleary)
When observations are created or destroyed we queue a delayed job to update the users species count, which is the value shown on their profile page and returned by the API. The delayed job is queued for 15 minutes from when the change was made (unless an existing job exists in which case a new job is not queued). Therefore there is currently up to a 15 minute delay in updating that value. This was an intentional choice and not a bug. Does that explain what you are seeing? If not can we have a concrete statement of the problem with an example, or repro steps?
If we want to change the timing we'd need a ticket for that in https://github.com/inaturalist/inaturalist. In my opinion it's best to keep some kind of delay in the cases where a user bulk uploads many observations through the website, apps, or uses the CSV uploader to upload hundreds of observations. We wouldn't want to have to recalculate species counts in between each observation creation, best to do it asynchronously and as infrequently as needed (e.g. at the end of the bulk upload)
Describe the bug The counts and links of observations and species observed on UserProfile should include casual observations.
To Reproduce Steps to reproduce the behavior:
Expected behavior Those counts should include the user's casual observations, and the links should take you to Explore and it should include the user's casual observations.
Context (please complete the following information):
Additional context The observation count actually does seem to be working, it's just the species count that seems messed up. The same thing's happening on the web, but Abhas considers this a bug.