retrospring icon indicating copy to clipboard operation
retrospring copied to clipboard

Make Discover 'really' weekly

Open pixeldesu opened this issue 10 years ago • 6 comments

But not using cron for it, we are cool and use Sidetiq

This helps us to reduce fetching queries and updating every time a user is visiting the site.

pixeldesu avatar Sep 13 '15 13:09 pixeldesu

Sidetiq is no longer maintained but we could use something as simple as Rails.cache.fetch

raccube avatar Apr 20 '20 07:04 raccube

Or, y'know, actual cron ;-)

There seems to be a number of alternatives to Sidetiq, though.

nilsding avatar Apr 20 '20 07:04 nilsding

Guess that's better as it means we don't get a slow page load for the first request after the cache has expired.

raccube avatar Apr 20 '20 08:04 raccube

We could even think about just calculating them once a week / twice a day / ... and store the results in the database.

nilsding avatar Apr 20 '20 08:04 nilsding

We could even think about just calculating them once a week / twice a day / ... and store the results in the database.

That's what I meant with triggering it over Sidetiq basically.

Storing the result somewhere and grabbing it for a week. We could probably just create a Rake-Task triggering an ActiveJob for that, and indeed hit that via cron on the server.

pixeldesu avatar Apr 20 '20 09:04 pixeldesu

once a week / twice a day / ...

I think twice a day could work quite nicely. If it was weekly it'd turn in to a sort of "weekly digest" which would get looked at once a week. This miss whole point of being able to see what's currently going on.

raccube avatar Apr 22 '20 12:04 raccube