summaryrefslogtreecommitdiff
path: root/src/meetingtools/apps
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-05-12 10:13:19 +0200
committerLeif Johansson <leifj@sunet.se>2011-05-12 10:13:19 +0200
commitca1d49acab1e0fbade083df339846e43926e8ff4 (patch)
tree0130e1af6081271dd97656fdf02b8c95daa573fe /src/meetingtools/apps
parent3869743100b1db40007666e47167a7ad7bcbbb1b (diff)
last visit fix
Diffstat (limited to 'src/meetingtools/apps')
-rw-r--r--src/meetingtools/apps/room/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index 698d755..ef1a641 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -343,14 +343,16 @@ def _random_key(length=20):
def _goto(request,room,clean=True,promote=False):
api = ac_api_client(request, room.acc)
now = time.time()
+ lastvisit = room.lastvisit()
room.lastvisited = datetime.now()
if clean:
session_info = api.request('report-meeting-sessions',{'sco-id':room.sco_id})
room.user_count = _nusers(session_info)
+ logging.debug("---------- nusers: %d" % room.user_count)
room.save()
if room.self_cleaning:
- if (room.user_count == 0) and (abs(room.lastvisit() - now) > GRACE):
+ if (room.user_count == 0) and (abs(lastvisit - now) > GRACE):
room = _clean(request,room)
return respond_to(request, {"text/html": "apps/room/launch.html"}, {'room': room})
else: