RSS Spam fix (#694)

* Fix spammy RSS feeds

* changelog
This commit is contained in:
Will Hunt 2023-03-28 15:57:48 +01:00 committed by GitHub
parent 33dc9eac58
commit 77ac90180f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/694.bugfix Normal file
View File

@ -0,0 +1 @@
Fix the bridge spamming RSS feeds repeatedly.

View File

@ -366,7 +366,7 @@ export class FeedReader {
const elapsed = Date.now() - fetchingStarted;
Metrics.feedFetchMs.set(elapsed);
const sleepFor = Math.min(this.sleepingInterval - elapsed, 0);
const sleepFor = Math.max(this.sleepingInterval - elapsed, 0);
log.debug(`Feed fetching took ${elapsed / 1000}s, sleeping for ${sleepFor / 1000}s`);
if (elapsed > this.sleepingInterval) {