summaryrefslogtreecommitdiff
path: root/service/pixelated/config
diff options
context:
space:
mode:
authorNavaL <ayoyo@thoughtworks.com>2016-06-24 18:37:25 +0200
committerNavaL <ayoyo@thoughtworks.com>2016-06-24 18:37:55 +0200
commit64c54186eff000762c291758973ca8e5db28f606 (patch)
treeca90b7c74583cfa170e90838b5722b96ba7138da /service/pixelated/config
parent12706c25ef02974ff54d1f42caac268f6eaa3a0c (diff)
Issue #694 add an admin restricted resource for user stats
Diffstat (limited to 'service/pixelated/config')
-rw-r--r--service/pixelated/config/services.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/service/pixelated/config/services.py b/service/pixelated/config/services.py
index b36eb0bb..a49e1df9 100644
--- a/service/pixelated/config/services.py
+++ b/service/pixelated/config/services.py
@@ -108,6 +108,9 @@ class ServicesFactory(object):
def add_session(self, user_id, services):
self._services_by_user[user_id] = services
+ def online_sessions(self):
+ return len(self._services_by_user.keys())
+
@defer.inlineCallbacks
def create_services_from(self, leap_session):
_services = Services(leap_session)
@@ -131,3 +134,6 @@ class SingleUserServicesFactory(object):
def destroy_session(self, user_id, using_email=False):
reactor.stop()
+
+ def online_sessions(self):
+ return 1