Commit Graph

83 Commits

Author SHA1 Message Date
HDVinnie 93a8a8d375 PHP Style Change (Laravel Pint CI) 2023-08-31 09:22:36 +00:00
Roardom dd7c80012b fix: upsert ordering
We want a queue and not a stack. I.e. first in first out, not first in last out.
2023-08-07 07:52:35 +00:00
HDVinnie e89b90cec8 Merge pull request #3027 from Roardom/history-upsert-take-3
(Update) Upsert history records take 3
2023-08-06 21:35:28 -04:00
Roardom d8dc3fd766 fix: downloaded announce logic 2023-08-05 05:52:19 +00:00
Roardom 5538be360e Revert "Revert "update: don't fetch history record before updating it""
This reverts commit 0aed738cb7.
2023-08-05 04:52:02 +00:00
Roardom 62f7bad6dc fix: torrent seeder/leecher count 2023-08-04 18:46:47 +00:00
Roardom 0aed738cb7 Revert "update: don't fetch history record before updating it"
This reverts commit 6f795b07ea.
2023-08-02 01:54:15 +00:00
HDVinnie 9d2613e7b0 Merge pull request #2988 from Roardom/lowercase-event
(Update) Lowercase the announce event at beginning
2023-07-31 21:49:23 -04:00
HDVinnie f776991059 Merge pull request #2975 from Roardom/update-history-upserts
(Update) Don't fetch history record before updating it
2023-07-31 21:48:43 -04:00
Roardom 9ed19c1593 update: lowercase the announce event at beginning
No need to keep converting it.
2023-07-30 01:20:11 +00:00
Roardom 6f795b07ea update: don't fetch history record before updating it 2023-07-28 20:08:20 +00:00
HDVinnie dc4b12963b Merge branch '7.x.x' into fix-personal-fl-caching 2023-07-28 02:35:16 -04:00
Roardom 2f10728ec0 fix: personal freeleech caching
We're constantly querying for personal freeleech existence if we only store it when it's true.
2023-07-28 06:13:50 +00:00
Roardom bb5255d968 Revert "update: cache personal freeleech existence instead of its value"
This reverts commit b48a9222d1.
2023-07-28 06:08:55 +00:00
Roardom 4825ac53a2 fix: freeleech token caching
We're constantly querying for freeleech token existence if we only store it when it's true.
2023-07-28 06:05:39 +00:00
Roardom b5246a0e80 Revert "fix: redundant fetching of records from the database"
This reverts commit 7d3a9e244e.
2023-07-28 05:21:31 +00:00
Roardom 2392da1310 Revert "fix: laravel default job model serialization"
This reverts commit 55d03d3819.
2023-07-28 05:20:33 +00:00
Roardom fa6ef2a65c Revert "update: announce job"
This reverts commit 2524a978ab.
2023-07-28 05:20:31 +00:00
Roardom 624abb8644 Revert "fix: announce user update"
This reverts commit ef29310cd3.
2023-07-28 05:20:28 +00:00
Roardom ef29310cd3 fix: announce user update 2023-07-28 03:27:37 +00:00
HDVinnie 2524a978ab update: announce job 2023-07-27 23:24:55 -04:00
Roardom 55d03d3819 fix: laravel default job model serialization
laravel by default automatically serializes models in a custom way when inserted into a job queue and fetches the model from the database again when the job is ran. We would rather not have these extra queries, so we can't pass in models, or data that is already serialized (as laravel will try to deserailize our serialization too and fail), so we opted for arrays, and filling in the properties into a new model again once the job is handled.
2023-07-27 03:11:04 +00:00
HDVinnie 3a26e4ae1c PHP Style Change (Laravel Pint CI) 2023-07-26 04:23:48 +00:00
HDVinnie 0d31d20d8a Merge branch '7.x.x' into fix-process-announce-selects 2023-07-26 00:22:46 -04:00
HDVinnie b2a6bf1ac3 Merge pull request #2959 from Roardom/personal-freeleech-ttl
(Update) Cache personal freeleech existence instead of its value
2023-07-25 23:19:48 -04:00
HDVinnie 282dfb272d fix: ProcessAnnounce.php
- was accidentally removed by me in https://github.com/HDInnovations/UNIT3D-Community-Edition/pull/2565
2023-07-25 23:19:22 -04:00
Roardom 88d6ae1d89 fix: ci 2023-07-26 02:39:44 +00:00
Roardom 7d3a9e244e fix: redundant fetching of records from the database
The `SerializesModels` trait fetches a new copy of the record from the database, causing 4 more queries than we thought we were using. This change reduces the query time in the ProcessAnnounce job by 55%.
2023-07-26 02:18:20 +00:00
Roardom b48a9222d1 update: cache personal freeleech existence instead of its value
We only cache it if it exists, so let's not query it every single time it doesn't exist.
We don't remove it from the hourly run command yet so that currently existing freeleeches can be deleted.
2023-07-25 22:48:56 +00:00
HDVinnie 5a3c3de9eb update: peers upsert 2023-07-24 13:22:43 -04:00
HDVinnie f8b9b3c80c Merge branch '7.x.x' into active-peers 2023-07-24 13:04:12 -04:00
HDVinnie d16bafc1e1 update: ProcessAnnounce.php 2023-07-24 12:57:21 -04:00
HDVinnie 61fccdc778 Merge branch '7.x.x' into Redis-Peer-Batching 2023-07-24 12:52:43 -04:00
Roardom 10c146d217 add: peer active status
Mark peers for deletion via this column so that they can be mass deleted later. This allows for combining peer inserts, updates and deletions into a single bulk peer upsert queue. Otherwise, when a user stops and starts a torrent before the bulk peer updates are collected in the queue, the peer may be deleted immediately after it gets inserted.
2023-07-23 00:42:45 +00:00
Roardom f26f82bc17 fix: immune status on bulk history upsert 2023-07-20 07:02:56 +00:00
Roardom e1505c86ad fix: redis history batching
We need to make sure default values are provided instead of null.
2023-07-19 06:00:59 +00:00
Roardom 6ea7d8af69 add: redis history batching 2023-07-18 09:46:37 +00:00
Roardom 9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
HDVinnie 106484f14b update: upsert
- history still needs too be made to upsert
- connectable logic needs updating
- $peer->delete() in job needs to be reworked

The only solution would be to instead of deleting it on stopped event, make another column on the peers table for is_active and update is_active to 1 in every case except for stopped, in which case update it to 0 instead of deleting and then a cron job can delete it later.

Co-Authored-By: Roardom <78790963+Roardom@users.noreply.github.com>
2023-07-02 23:32:42 -04:00
HDVinnie 93b2b46f27 Merge branch '7.x.x' into Redis-Peer-Batching 2023-05-26 12:13:32 -04:00
HDVinnie 3cf9fd6425 Merge pull request #2707 from Roardom/fix-stopped-event
(Fix) Stopped event not decreasing torrent seeders/leechers
2023-04-21 04:47:13 -04:00
HDVinnie f82fe55304 update: announce job
- close #2709
2023-04-20 09:06:29 -04:00
Roardom 0c4f4becfb fix: stopped event not decreasing torrent seeders/leechers 2023-04-20 09:14:49 +00:00
Roardom e812ef4340 update: only update the torrents table a max of once per announce 2023-04-16 00:52:54 +00:00
HDVinnie 19b7213889 update: working batch inserts 2023-02-13 19:12:33 -05:00
HDVinnie 42de33ebaf update: peer batching 2023-02-11 18:59:50 -05:00
HDVinnie 149bb75064 PHP Style Change (Laravel Pint in CI) 2023-02-05 14:08:52 +00:00
HDVinnie 3a04dbe35e Merge branch '6.x.x' into Redis-Peer-Batching 2023-02-05 09:07:54 -05:00
HDVinnie 9163a0dbe4 Merge branch '6.x.x' into Redis-Peer-Batching 2023-02-05 04:35:32 -05:00
HDVinnie 472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00