summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/meetingtools/apps/room/views.py6
-rw-r--r--src/meetingtools/settings.py1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index 0ad535e..2140cc9 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -17,7 +17,8 @@ import logging
from pprint import pformat
from meetingtools.utils import session
import time
-from meetingtools.settings import GRACE, BASE_URL, DEFAULT_TEMPLATE_SCO
+from meetingtools.settings import GRACE, BASE_URL, DEFAULT_TEMPLATE_SCO,\
+ IMPORT_TTL
from django.utils.datetime_safe import datetime
from django.http import HttpResponseRedirect
from django.core.exceptions import ObjectDoesNotExist
@@ -245,6 +246,9 @@ def _import_room(request,acc,r):
if not room:
return None
+
+ if abs(room.lastupdated - time.time()) < IMPORT_TTL:
+ return room
api = ac_api_client(request,acc)
userlist = api.request('meeting-usermanager-user-list',{'sco-id': room.sco_id},False)
diff --git a/src/meetingtools/settings.py b/src/meetingtools/settings.py
index 7c7cc41..ca59e2d 100644
--- a/src/meetingtools/settings.py
+++ b/src/meetingtools/settings.py
@@ -28,6 +28,7 @@ DATABASES = {
}
GRACE = 10
+IMPORT_TTL = 30
DEFAULT_TEMPLATE_SCO=18807
APPEND_SLASH = False