We are using the latest version of Discourse. Recently I noticed that the Activity Metrics reports on the administration page is being updated only once per day. Actually: only in the first time of the day that I access the manager. Is it normal? Can I configure Discourse to update this report more frequently?
My understanding is that the stats in the activity section should be updated once every half hour. That doesn’t seem to be happening though. There is no setting that can be used to configure this. We’ll take a look at what’s going on with it.
I am seeing the same issue on other sites, so I don’t think there is a problem with your installation. The problem I’m seeing is that the stats in the Activity section of the admin dashboard do not keep in sync with the stats of the individual reports that the data is pulled from. We will look into what is going on with this.
I’m still seeing this issue in the Today column of the Activity Metrics on Meta. I’m fairly sure the results are only supposed to be cached for half an hour, but it seems that the results for that section are cached for a longer period of time.
I’m not the person to fix this, but the issue could be related to what’s going on here:
Reading through that file, it seems that the intention is for the stats to only be cached for 30 minutes, but as far as I can tell, the stats are only updated once per day.
Most likely unrelated, but the setex method seems like it takes a time in seconds, not minutes. The code is passing 35.minutes in its call to the method. I’m assuming there is some Rails magic that handles the conversion to seconds.