summaryrefslogtreecommitdiff
path: root/meetingtools
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2014-04-11 16:19:34 +0200
committerJohan Lundberg <lundberg@nordu.net>2014-04-11 16:19:34 +0200
commitc3eb142a7bd865fe3db74849e5ca949258459a00 (patch)
tree1919f4a0fce99ca9dac223c6611b603187308d74 /meetingtools
parentf88dfc2ce4e88b11d56b40eea5f46007196b7498 (diff)
Added caching for domain content.
Diffstat (limited to 'meetingtools')
-rw-r--r--meetingtools/apps/content/tasks.py6
1 files changed, 6 insertions, 0 deletions
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: