diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/activitypub/inbox-manager.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/activitypub/inbox-manager.ts b/server/lib/activitypub/inbox-manager.ts index 6d9bf7cf0..18ae49532 100644 --- a/server/lib/activitypub/inbox-manager.ts +++ b/server/lib/activitypub/inbox-manager.ts | |||
@@ -35,7 +35,7 @@ class InboxManager { | |||
35 | }) | 35 | }) |
36 | 36 | ||
37 | setInterval(() => { | 37 | setInterval(() => { |
38 | StatsManager.Instance.updateInboxStats(this.messagesProcessed, this.inboxQueue.length()) | 38 | StatsManager.Instance.updateInboxStats(this.messagesProcessed, this.getActivityPubMessagesWaiting()) |
39 | }, SCHEDULER_INTERVALS_MS.updateInboxStats) | 39 | }, SCHEDULER_INTERVALS_MS.updateInboxStats) |
40 | } | 40 | } |
41 | 41 | ||
@@ -44,6 +44,10 @@ class InboxManager { | |||
44 | .catch(err => logger.error('Cannot add options in inbox queue.', { options, err })) | 44 | .catch(err => logger.error('Cannot add options in inbox queue.', { options, err })) |
45 | } | 45 | } |
46 | 46 | ||
47 | getActivityPubMessagesWaiting () { | ||
48 | return this.inboxQueue.length() + this.inboxQueue.running() | ||
49 | } | ||
50 | |||
47 | static get Instance () { | 51 | static get Instance () { |
48 | return this.instance || (this.instance = new this()) | 52 | return this.instance || (this.instance = new this()) |
49 | } | 53 | } |