Eloquent automatically updates the updated_at timestamp, even if the bumped_at field doesn't change. This results in meilisearch reimporting all the torrents once every hour, which is not necessary and causes increased load.
Laravel returns numeric strings when an int is saved to cache, which breaks a lot of the logic here. Fixed by removing cache everywhere except rss and middleware, and in those two spots, caching the whole group and not just the id of the group.
These aren't currently being used. If this functionality is to be completed, it should be easy enough to find the code through the git history again. However, UNIT3D doesn't really use events and it'd be better for most of the notification sending to be inline (except the stale one of course).
Sometimes, there is an ssl error from tmdb (Once every few hundred thousand http requests). When this happens, because the jobs are processed synchronously to avoid dos'ing tmdb, it throws an exception and kills the command. Instead, allow the http requests to be retried, and skip the fetch if it still fails after 3 retries.
Allows the fetch meta command to work without hitting rate limits on tmdb. Tmdb's rate limit is ~40 per second, but each movie/tv has to send additional http request for each collection, network, company and person, so I figured 2 per second was safe.
The query only takes 6 seconds on my local untuned machine. Caching it for an hour is probably fine, we have worse queries out there, and indexing isn't an option since this table is write-heavy. Reduces overall complexity and prevents blank page after cache is reset.
When the featured flag goes out of sync with the featured_torrents table (for reasons still unknown), the torrent is permanently labeled as freeleech, while 100% of traffic is always credited.
Just an initial portion for now fixing incorrect text and preventing future incorrect text. Eventually, I'd like to fix everything still listed under "ignoredWords" in cspell.json.
- makes unit3d php8.4 + required
- fixes multiple implicitly to explicit nullable type
- dependency updates
- github action updates
- carbon 2 needs to move to carbon 3 in separate pr
Using scout directly doesn't work because when increasing the maxTotalHits in meilisearch, scout will use the max instead of just fetching the current page. Meilisearch seems to handle a max of 200k torrents fine on its own, with 12ms latency when e.g. filtering by type down to 38000 totalHits. Run `php artisan scout:sync-index-settings`, followed by `php artisan auto:sync_torrents_to_meilisearch` after updating.