From 34a41d327ff84c818c04d7bfcd50d51f08fbf1b8 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 10 Nov 2022 22:28:47 +0100 Subject: [PATCH] Log warning in case number of workers reaches maximum --- Cargo.lock | 2 +- src/core/activity_queue.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 552f0e8..c35dffd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "activitypub_federation" -version = "0.2.2" +version = "0.2.3" dependencies = [ "activitypub_federation_derive", "activitystreams-kinds", diff --git a/src/core/activity_queue.rs b/src/core/activity_queue.rs index 704e9f5..8f7ec03 100644 --- a/src/core/activity_queue.rs +++ b/src/core/activity_queue.rs @@ -84,6 +84,9 @@ where stats.dead.this_hour(), stats.complete.this_hour() ); + if stats.running as u64 == instance.settings.worker_count { + warn!("Maximum number of activitypub workers reached. Consider increasing worker count to avoid federation delays"); + } } }