summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2012-02-06 13:57:28 +0100
committerLeif Johansson <leifj@sunet.se>2012-02-06 13:57:28 +0100
commit9d323e709650fd088dbe053044a203470b09175e (patch)
treeb4d189561e062df163bc66d1761577f7e3888dea
parent9944056f91285f00a0943cfec9c1c84fb3e5052c (diff)
recheck all recently active rooms often
-rw-r--r--src/meetingtools/apps/room/tasks.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/meetingtools/apps/room/tasks.py b/src/meetingtools/apps/room/tasks.py
index 4f67fab..63fb592 100644
--- a/src/meetingtools/apps/room/tasks.py
+++ b/src/meetingtools/apps/room/tasks.py
@@ -179,8 +179,14 @@ def _import_meeting_sessions_acc(acc):
_import_meeting_room_session(api,acc,room.sco_id,None,room)
except Exception,ex:
logging.error(ex)
-
+
+def _recheck_active_meetings_acc(acc):
+ api = ac_api_client_direct(acc)
+ for room in Room.objects.filter(acc=acc,user_count__gt=0):
+ _import_meeting_room_session(api,acc,room.sco_id,None,room)
+
@periodic_task(run_every=crontab(hour="*", minute="*/1", day_of_week="*"))
def _import_meeting_sessions():
for acc in ACCluster.objects.all():
- _import_meeting_sessions_acc(acc) \ No newline at end of file
+ _import_meeting_sessions_acc(acc)
+ _recheck_active_meetings_acc(acc) \ No newline at end of file