__author__ = 'skelly'

@@ -1,22 +1,623 @@
-__author__ = 'skelly'
+from celery.task import task%0Afrom couchdbkit.exceptions import ResourceNotFound%0Afrom corehq.apps.ota.views import get_restore_response%0Afrom corehq.apps.users.models import CommCareUser%0A%0A%0A@task%0Adef prime_restore(user_id, since=None, version='1.0', state=None, items=False, cache_timeout=None):%0A    try:%0A        couch_user = CommCareUser.get(user_id)%0A    except ResourceNotFound:%0A        return%0A%0A    get_restore_response(%0A        couch_user.domain,%0A        couch_user,%0A        since=since,%0A        version=version,%0A        state=state,%0A        items=items,%0A        force_cache=True,%0A        cache_timeout=cache_timeout%0A    )
 %0A

add task to prime restore cache