diff options
author | Leif Johansson <leifj@sunet.se> | 2013-03-04 06:47:59 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2013-03-04 06:47:59 +0100 |
commit | 8b2ac6dfb37ef6098372ca68f99e1d8cd1b8cc61 (patch) | |
tree | e61094d12d65c48cfc023511a4690705b7baa5bc /meetingtools | |
parent | 4508fb9cff19fb41f0b0ed5745661eb8f18b1e0b (diff) |
correct crontab
Diffstat (limited to 'meetingtools')
-rw-r--r-- | meetingtools/apps/room/tasks.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meetingtools/apps/room/tasks.py b/meetingtools/apps/room/tasks.py index a94ee54..76264c4 100644 --- a/meetingtools/apps/room/tasks.py +++ b/meetingtools/apps/room/tasks.py @@ -210,10 +210,11 @@ def import_acc(acc,since=0): def import_all_rooms(): for acc in ACCluster.objects.all(): import_acc(acc,since=3700) - + + def start_user_counts_poll(room,niter): poll_user_counts.apply_async(args=[room],kwargs={'niter': niter}) - + @task(name='meetingtools.apps.room.tasks.poll_user_counts',rate_limit="10/s") def poll_user_counts(room,niter=0): logging.debug("polling user_counts for room %s" % room.name) @@ -240,7 +241,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="*/5", day_of_week="*")) +@periodic_task(run_every=crontab(hour="*", minute="*/15", day_of_week="*")) def import_sessions(): for room in Room.objects.all(): with ac_api_client(room.sco.acc) as api: @@ -257,7 +258,7 @@ def import_sessions(): room.save() break -@periodic_task(run_every=crontab(hour="*", minutes="*/5", day_of_week="*")) +@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) |