Skip to content

Refactor: Decouple HTTP Request Processing for Background Thread Execution

Eru Ilúvatar requested to merge eru/parsing/offload-indexing into master

Previously torrent processing was done in the context of the HTTP request so that we relied on fast indexers. This is because we want to deliver results quickly to Stremio. However, some of the better indexers take more time to process results from Jackett (torrentgalaxy, rarbg).

Now the Jackett search process queries results in the background, sends the results to a redis pubsub topic, and then polls for results. This way the user can still get results quickly, but the slower indexers are still processed in the background for the next request. This means that cold searches might return less results the first time, but subsequent searches will yield much higher results post processing.

I also improved indexing so that whole series are indexed under season keys and searches check both season and episode keys in redis.

Edited by Eru Ilúvatar

Merge request reports