Skip to content

Commit 20345f2

Browse files
committed
feat: take a short break after a news update fetch to not hammer the server
1 parent 07c8c55 commit 20345f2

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

database/.sqlx/query-fb72ef2f19c5d5aa356ffe4a00ab1b1a7641d6d1b4a36df6cb3952de6975a9a5.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/util/news_updater.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ impl NewsUpdater {
150150
)
151151
.await?;
152152
}
153+
154+
// Take a short break after a news update to not hammer the server.
155+
sleep(Duration::from_millis(500)).await;
153156
}
154157

155158
info!("Saving any changes to the news to the database.");

0 commit comments

Comments
 (0)