From c3eb142a7bd865fe3db74849e5ca949258459a00 Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Fri, 11 Apr 2014 16:19:34 +0200 Subject: Added caching for domain content. --- meetingtools/apps/content/tasks.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'meetingtools') diff --git a/meetingtools/apps/content/tasks.py b/meetingtools/apps/content/tasks.py index dcdae03..3de9112 100644 --- a/meetingtools/apps/content/tasks.py +++ b/meetingtools/apps/content/tasks.py @@ -28,6 +28,12 @@ def cache_cluster_content(): get_cluster_content(acc) +@periodic_task(run_every=crontab(hour="*", minute="*/15", day_of_week="*")) +def cache_domain_content(): + for domain_tag in Tag.objects.filter(name__startswith='domain:'): + get_domain_content(domain_tag) + + def import_acc(acc, since=0): with ac_api_client(acc) as api: if since > 0: -- cgit v1.1