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.
Although the admin page says that the overview has been updated for a few minutes, this only happens once a day. How can I set this to be updated more than once a day?
EDIT:
Found out that the problem is only with the month view. If I switch to the weekly view, the statistics are correct.
EDIT 2:
OK. Not everything is up to date in the week view.
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.
This was a bug in our cache.rb library where we were not passing the expires_in value and as a result were using the default value of one day instead of 30 minutes.