20 Commits
Author SHA1 Message Date
Mike Gibson 93dd4c6232 fix linting errors 2026-01-31 11:47:30 +00:00
Mike Gibson 3d18c15acf WIP 2025-12-07 10:30:39 +00:00
Mike Gibson e22d14b5ed WIP 2025-08-30 12:48:35 +00:00
Mike Gibson d5aaaeaacb Plugins WIP 2025-07-31 08:05:37 +00:00
Mike Gibson b6081fecd6 WIP 2025-07-04 17:59:22 +01:00
mgdigitalandGitHub f196dc1dd9 Optimize concurrent classification (#422) 2025-05-11 13:00:13 +01:00
mgdigitalandGitHub f70352f4c5 Upgrade golangci-lint and enable more rules (#421) 2025-05-10 23:31:23 +01:00
mgdigitalandGitHub 4a45981b5b stricter linting rules (#409) 2025-03-23 23:36:50 +00:00
mgdigitalandGitHub fc8acfb6f6 Fix duplicate key error for queue jobs (#319) 2024-10-15 07:27:33 +01:00
mgdigitalandGitHub 065db85537 Upgrade go libs (#318)
* Upgrade go libs

* Fix video3D
2024-10-15 07:08:21 +01:00
mgdigitalandGitHub bbd8a10de6 Processor optimization (#278) 2024-06-13 16:16:53 +01:00
mgdigitalandGitHub d8c7ea35d7 Processor optimisation - reduce concurrency (#277)
* Processor optimisation - reduce concurrency
2024-06-13 16:03:56 +01:00
mgdigitalandGitHub 8598f77519 Add batch reprocessing queue job and 0.9.0 upgrade hook (#267) 2024-06-08 08:39:06 +01:00
mgdigitalandGitHub dd31b11c3c Classifier runtime flags (#265)
- Allow classifier flags to be specified at runtime, overriding configured flags
- Add a generic `apis_enabled` flag to disable all external API calls in the classifier

The motivation for this is to allow torrents to be much more quickly re-indexed by disabling API calls only for individual classifier runs.
2024-05-30 13:24:24 +01:00
mgdigitalandGitHub f7b1f11fa8 Parallel search strategies (#264)
For querying search result items, we try 2 strategies:
- the default strategy is always tried, and is usually the most performant
- for certain searches where items are filtered to a small number of results, and ordered with a limit, the default strategy can be very slow, so we try a CTE strategy, with order and limit on a materialized view of the complete results, and we put it in a race with the default strategy
2024-05-30 09:26:34 +01:00
mgdigitalandGitHub c16f76130c Classifier rewrite (#213)
The classifier has been re-implemented and now uses a DSL allowing for full customisation. Several bugs have also been fixed.

- Closes https://github.com/bitmagnet-io/bitmagnet/issues/182
- Closes https://github.com/bitmagnet-io/bitmagnet/issues/70
- Closes https://github.com/bitmagnet-io/bitmagnet/issues/68
- Hopefully fixes https://github.com/bitmagnet-io/bitmagnet/issues/126
2024-04-21 16:24:10 +01:00
mgdigitalandGitHub a95b5ae36e Processor optimisations (#161)
Various optimisations to torrent processing:

- Only persist new content
- Republish failed hashes if any succeeded, instead of failing entire job
- Only delete torrent_contents records where necessary
- Increase default batch sizes
2024-02-23 16:16:44 +00:00
mgdigitalandGitHub 977959fe78 Processor optimisations (#119) 2024-01-26 14:45:35 +00:00
mgdigitalandGitHub 6635df0b2d Reprocess tweaks (#116) 2024-01-25 13:03:22 +00:00
mgdigitalandGitHub d443c5d8d9 Refactor torrent processing (#106)
A rework of the torrent creation workflow: previously a `Torrent` record was always created with a corresponding `TorrentContent` record, which would usually be empty; following this a `classify_torrent` queue job would attempt classification then update the `TorrentContent` record. 

Following this update, `Torrent` records will always be created in isolation, and a `process_torrent` job will then run in the queue. This will not only classify the torrent, but also perform any other tasks like search reindexing. For torrents that have already been matched to a piece of content, rematching will not occur (unless specified in the CLI command, see below), which saves a significant amount of work.

A new entity type, `TorrentHint` has been created for providing hints to the classifier (currently used only by the import tool). Previously any hints for the classifier were added directly to the `TorrentContent` record, which was a conflation of 2 different things (the classification result, and hints for the classifier), which is problematic when it comes to reclassification.

Additionally, a new CLI command, `reprocess` has been added, which will reprocess all torrents, classify them, and update the search index. For already matched torrents, rematching will only occur when passing the `--rematch` flag.

A few reasons for this change:

- It will prevent unclassified (but classifiable) torrents showing at the top of the list in the WebUI, which is confusing
- The new search index will require reindexing of all torrents, and the CLI command provides a simple way to do this
- In future, we'll want to hang further steps off the `process_torrent` job, such as rules-based deletion, and this provides the groundwork for that
2024-01-22 19:23:00 +00:00