RFC: Templates rendering status

My counter question is then: With regular check, now talking about once per 24 hours, how can we make sure the information is actually up-to-date when user opens up a page? None of the two proposals are perfect.

If we are gonna do that, then I suggest this to be a rake task and opt-in. We need to be very careful there’s not much spare CPU cycles and memory on Katello installations.

I still don’t like this, that’s a hammer solution to the problem. My another proposal: What if we calculate the status the moment user opens up the page? Since there will be lag, we can immediately show up last known state and trigger a separate HTTP request to fetch up-to-date info (no background processing involved). Since we have JS/React the component can show it’s still working and refresh the state few seconds after.

This was user will always get the fresh data, this could work hand in hand with the current proposal, but I’d rather prefer a rake task rather than recurring background job. Still, I don’t think checking all hosts everyday is useful, I’d put some reasonable constraints - for example only for active hosts (has some checkings, last_modified or something).

One issue with this is API/CLI, we would need to calculate this during the main request, or at least indicate this could be outdated. I don’t know, I still like reactive solution better.