def get(self): # We don't retry this task automatically, because it's looking for # everything that doesn't already have a thumbnail every time -- # anything that doesn't get done now will be retried anyway on the next # iteration of the cron job. if self.repo: for p in (model.Photo.all().filter('thumbnail_data =', None).filter( 'repo =', self.repo)): photo.set_thumbnail(p) else: for repo in model.Repo.list(): self.add_task_for_repo(repo, 'prepare-thumbnails', self.ACTION)
def get(self): # We don't retry this task automatically, because it's looking for # everything that doesn't already have a thumbnail every time -- # anything that doesn't get done now will be retried anyway on the next # iteration of the cron job. if self.repo: for p in (model.Photo.all() .filter('thumbnail_data =', None) .filter('repo =', self.repo)): photo.set_thumbnail(p) else: for repo in model.Repo.list(): self.add_task_for_repo(repo, 'prepare-thumbnails', self.ACTION)