diff options
author | Leif Johansson <leifj@sunet.se> | 2013-03-04 06:17:58 +0100 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2013-03-04 06:17:58 +0100 |
commit | ed0e7704e84e37819e10bf52f0a9827ee8c390dc (patch) | |
tree | d1d9af96d01023778110f7dbeeffe5eac427fc40 /meetingtools/apps/stats | |
parent | 31df9cf0ca0cb3b2be0eff222add51f8a27cf2d7 (diff) |
- turn off asgard for now
- import user rooms as failsafe on login
- expose import_sessions as task
Diffstat (limited to 'meetingtools/apps/stats')
-rw-r--r-- | meetingtools/apps/stats/tasks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meetingtools/apps/stats/tasks.py b/meetingtools/apps/stats/tasks.py index ac68a29..9e2f437 100644 --- a/meetingtools/apps/stats/tasks.py +++ b/meetingtools/apps/stats/tasks.py @@ -1,6 +1,6 @@ import logging from celery.schedules import crontab -from celery.task import periodic_task +from celery.task import periodic_task, task from meetingtools.apps.room.models import Room from meetingtools.ac import ac_api_client from meetingtools.apps.cluster.models import ACCluster @@ -9,6 +9,7 @@ from meetingtools.apps.stats.models import UserMeetingTransaction __author__ = 'leifj' + def import_acc_sessions(acc,since=0,room_last_visited=False): with ac_api_client(acc) as api: p = {'sort': 'asc','sort1': 'date-created','filter-type': 'meeting'} @@ -40,6 +41,7 @@ def import_acc_sessions(acc,since=0,room_last_visited=False): ne += 1 logging.info("%s: Imported %d transactions with %d errors" % (acc,nr,ne)) +@task def import_sessions(since,room_last_visited=False): for acc in ACCluster.objects.all(): import_acc_sessions(acc,since,room_last_visited) |