Skip to content
Snippets Groups Projects
Commit 770397d2 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #5644 from RocketChat/improve-instance-count

Try to count only valid instances
parents 3b8f5eee 3217739a
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ RocketChat.statistics.get = ->
statistics.migration = RocketChat.Migrations._getControl()
statistics.instanceCount = InstanceStatus.getCollection().find().count()
statistics.instanceCount = InstanceStatus.getCollection().find({_updatedAt: {$gt: new Date(Date.now()-process.uptime()*1000-2000)}}).count()
if MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle?.onOplogEntry? and RocketChat.settings.get('Force_Disable_OpLog_For_Cache') isnt true
statistics.oplogEnabled = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment