1 from celery.task import task
5 def refresh_by_pk(cls, pk):
6 cls._default_manager.get(pk=pk).refresh()
9 def refresh_instance(instance):
10 refresh_by_pk.delay(type(instance), instance.pk)
14 def publishable_error(book):
16 book.assert_publishable()
17 except AssertionError, e: