# האם לקרוא ל-AdminDashboardGeneralData.refresh\_stats באתחול?

**URL:** <https://meta.discourse.org/t/call-admindashboardgeneraldata-refresh-stats-at-boot/214667>\
**Category:** Development\
**Created:** [12 בינואר,‏ 2022,‏ 5:31pm UTC](https://meta.discourse.org/t/call-admindashboardgeneraldata-refresh-stats-at-boot/214667 "2022-01-12T17:31:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [12 בינואר,‏ 2022,‏ 5:55pm UTC](https://meta.discourse.org/t/call-admindashboardgeneraldata-refresh-stats-at-boot/214667/2 "2022-01-12T17:55:38Z")

</div>

In general we don’t like to run stuff ‘at boot’. While it may make sense in a single-server, non-multisite environment, stuff gets hairy at scale.

For example, if you have an autoscaling setup which adds/removes servers based on load, every one of those scale events can cause multiple servers to “boot” simultaneously. We wouldn’t want all of them to delay startup while some stats are updated.

We also like to make sure that servers can boot successfully, even if the database/redis are in a readonly state.

For this particular pfaffmanager case, do you have a custom plugin and/or discourse\_docker template running on the sites? From outside Discourse, you could trigger it like:

```runner
rails runner "About.refresh_stats

```

---

_[View the full topic](https://meta.discourse.org/t/call-admindashboardgeneraldata-refresh-stats-at-boot/214667)._
