From 33702b48637d2cd50cb2d72a88b2f239c473f3c2 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Thu, 20 Mar 2014 17:22:11 +0100 Subject: Nicer cron settings. --- meetingtools/apps/room/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meetingtools') diff --git a/meetingtools/apps/room/tasks.py b/meetingtools/apps/room/tasks.py index 55f8cb9..ae24b88 100644 --- a/meetingtools/apps/room/tasks.py +++ b/meetingtools/apps/room/tasks.py @@ -214,7 +214,7 @@ def import_acc(acc,since=0): logging.info("%s: Imported %d rooms and got %d errors" % (acc,nr,ne)) -@periodic_task(run_every=crontab(hour="*", minute="*", day_of_week="*")) +@periodic_task(run_every=crontab(hour="*", minute="*/15", day_of_week="*")) def import_all_rooms(): for acc in ACCluster.objects.all(): import_acc(acc,since=3700) @@ -249,7 +249,7 @@ def import_recent_user_counts(): logging.info("%s: Checked usage for %d rooms since %s" % (acc,nr,then)) # look for sessions that are newer than the one we know about for a room -@periodic_task(run_every=crontab(hour="*", minute="*/15", day_of_week="*")) +@periodic_task(run_every=crontab(hour="*/3", minute="0", day_of_week="*")) def import_sessions(): for room in Room.objects.all(): with ac_api_client(room.sco.acc) as api: @@ -269,7 +269,7 @@ def import_sessions(): @periodic_task(run_every=crontab(hour="*", minute="*/15", day_of_week="*")) def import_transactions(): for acc in ACCluster.objects.all(): - then = datetime.now() - timedelta(seconds=600) + then = datetime.now() - timedelta(seconds=1200) then = then.replace(microsecond=0) with ac_api_client(acc) as api: seen = {} -- cgit v1.1