From 9d323e709650fd088dbe053044a203470b09175e Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Mon, 6 Feb 2012 13:57:28 +0100 Subject: recheck all recently active rooms often --- src/meetingtools/apps/room/tasks.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/meetingtools') 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 -- cgit v1.1