summaryrefslogtreecommitdiff
path: root/meetingtools
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2014-03-20 17:22:11 +0100
committerJohan Lundberg <lundberg@nordu.net>2014-03-20 17:22:11 +0100
commit33702b48637d2cd50cb2d72a88b2f239c473f3c2 (patch)
tree7061282b285bc51ec158e2d011b456ded6dd96b3 /meetingtools
parentd66e1443d7e29ba9c2ef1e2603144f9e08155b14 (diff)
Nicer cron settings.
Diffstat (limited to 'meetingtools')
-rw-r--r--meetingtools/apps/room/tasks.py6
1 files changed, 3 insertions, 3 deletions
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 = {}