Call AdminDashboardGeneralData.refresh_stats at boot?

Thanks. That all makes sense.

No! One of the key principles is that everything is just as it would be on a standard install. There are zero pfaffmanager-specific dependencies. If someone sees here that they should do something like a rebuild, add a plugin, or add an environment variable to app.yml, pfaffmanager will do it exactly as if they knew what ssh was and could type commands. Installs use discourse-setup, upgrades run ./launcher rebuild (or bootstrap, destroy, start for 2-container setups). If Postgres is out of date, the procedures in PostgreSQL 13 update are followed, and so on. A couple things have tempted me to make an optional support plugin, but I mostly want to avoid that. I’m already juggling Ansible, Rails, and Ember–having another piece at play is not very attractive.

But that runner bit was a big help. I’ll just run this after a newly built container is restarted:

docker exec web_only bash -c 'rails runner AdminDashboardGeneralData.refresh_stats'

Thanks so very much. This was just what I needed.

3 Likes