I can't take Rubocop any more. Moving up to Ruby 3 forces us to update RuboCop,
and it comes with dozens of linters that I'd have to evaluate, none of which is
a marginal improvement. I'm done having opinions.
Really embarassing bug in e334ae. This returned the current traffic intensity
number for all queries (0-100) so this started sending the mailing list mode
users basically every story and comment from the dawn of time.
TrafficHelper's hot-path intensity does a single select for a single row and
loads the value rather than instantiate an ActiveRecord object.
Updating the intensity has moved entirely to the cron job to prevent dogpiling,
and does three upserts instead of select + upsert.
No more hassling around with different keys for intensity when we only use the
latest value.
No parameters that need tuning and a single select for most hits.
Logo intensity is based on traffic in the last 15m compared to the last 90
days, and that calculation is cached for 5m. Deliberately does not use
transactions: we don't need the correctness, and it's cheaper to overwrite
a couple times than lock Keystore. Addresses #536; will know in a week if it
closes.