Increase the execution interval for the tracker stats importer
@josecelano がすでに取り組んでいます。
2024年4月24日 から。
評価
この issue はまだ評価されていません。
説明
Relates to: https://github.com/torrust/torrust-demo/issues/1
There is a background task that imports torrent stats from the Tracker. The Tracker Statistics Importer checks every 100 milliseconds if there are torrents to import. It executes a SQL query to fetch torrents that have not been updated in the last hour:
"torrent_id" INTEGER NOT NULL,
"tracker_url" VARCHAR(256) NOT NULL,
"seeders" INTEGER NOT NULL DEFAULT 0,
"leechers" INTEGER NOT NULL DEFAULT 0,
"updated_at" TEXT DEFAULT 1000-01-01 00:00:00,
FOREIGN KEY("torrent_id") REFERENCES "torrust_torrents"("torrent_id") ON DELETE CASCADE,
UNIQUE("torrent_id","tracker_url"),
PRIMARY KEY("torrent_id")
);
The field updated_at stores the last update date. You can configure the importer in the config file:
[tracker_statistics_importer]
torrent_info_update_interval = 3600
That configuration means the Index should try to update torrents at least every hour.
It seems querying the database every 100 milliseconds is overloading the demo server. Although it's a tiny instance, we should increase the interval. It could be a configuration option or even calculated manually in the future.
According to the data I've collected we could increase it from 100 milliseconds to 2000 milliseconds.
- 主要言語
- Rust
- スター
- 100
- フォーク
- 28
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
torrust/torrust-index のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
torrust/torrust-index#918 ·
-
Dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
torrust/torrust-index#865 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 18/100
torrust/torrust-index#816 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
torrust/torrust-index#815 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
torrust/torrust-index#814 ·
torrust/torrust-index の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
marketing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
difficulty: easy docs help wanted tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
-
bug help wanted ui
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
userFRM/egui-charts#4386 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
eliasstravik/herdr-projects#1605 · コメント 1 件 ·