Who's Online Plugin (discourse-whos-online)

(Andrew Waugh) #62

As a concrete example. One of the other mods just mentioned seeing 86 users online. I looked at the site and who’sonline showed 47 for me. I reloaded the page and it then showed 5.

This in the space of 5 minutes on a server with 64G ram.

Dealing with the limited messagebus backlog
(David Taylor) #63

Wow, that’s a pretty dramatic change!

What do you have the who’s_online_active_timeago setting set to?

(Andrew Waugh) #64

sidekiq isn’t running behind, nothing in /logs since about 4 hours.

(David Taylor) #65

I think I know what the problem is (see my post in #dev), I’ll try and get it fixed in the next few days :slight_smile:

(David Taylor) #66

I’ve just pushed a fix for this, please let me know if you see any more issues

(DiscourseMetrics.com) #67

After updating and waiting a few hours, I’m seeing the “no one is online” message. :confused: The sidekiq job appears to run correctly.

(David Taylor) #68

Silly question: are you sure that there are people online? :wink:

If opening the forum in a new tab produces a different result then there’s something wrong - can you check if there’s anything in the javascript console?

(DiscourseMetrics.com) #69

I have about 80 users online, hehe, so I know it’s not that :slight_smile: No errors in console, does not work in new tab either. I’m on Discourse beta 10.

(AppyBuilder) #70

Very cool plugin.
How could we set it up to completely remove ‘Who’s Online’ (including avatars) IF number of online users fall below a threshold; e.g. 10 ?


(David Taylor) #71

Yep, just set this site setting to 10

And change this language string to be empty:

(AppyBuilder) #72

@david Thanks for reply. Your awesome plugin doesn’t take blank (or empty spaces). Seems like some non-space characters have to be entered

(AppyBuilder) #73

…Also, avatars would still show when hitting the minimum??

(David Taylor) #74

You are indeed correct on both counts. Shouldn’t be too hard to fix - I’ll look at it shortly.

(David Taylor) #75

@Hossein_Amerkashi please try updating to the latest version of the plugin - it should fix the issues you found. I’ve added a new setting, so there’s no need to change the language string to be blank.

whos online hide below minimum display: if enabled, the widget will be entirely hidden when the number of users is less than minimum_display

Have updated the OP with the new details

(AppyBuilder) #76

Awesome. That’s great. Thanks

(AppyBuilder) #77

@david, To get latest, do we basically restart discourse like below?
cd /var/discourse
./launcher rebuild app

(David Taylor) #78

Yep, that’ll do it

If you’re running the standard install you should also be able to visit the /admin/upgrade page and do it with a nice interface.

(AppyBuilder) #79

Thanks for adding the new setting. One more suggestion (if possible). Can it check and see if admin (and/or mederator) and if so, display whose online? BTW, I still had to blank on the ‘no users online’ text (add a dot - didn’t accept empty)

(David Taylor) #80

It can’t hide/show based on admin status, but you can do it by trust level. So you could set it to only show to TL4

(AppyBuilder) #81

Yes, but that, unfortunately, means that public or below TL4 (example), won’t see it.

If somehow, below could be updated to pass a specific trustlevel, then that would do the job: