def _schedule_updates(podcasts): """ Schedule updates for podcasts """ logger.info("Scheduling %d podcasts for update", len(podcasts)) # queue all those podcast updates for podcast in podcasts: # update_podcasts.delay() seems to block other task execution, # therefore celery.send_task() is used instead urls = [podcast.url] celery.send_task("mygpo.data.tasks.update_podcasts", args=[urls])
def _schedule_updates(podcasts): """ Schedule updates for podcasts """ logger.info('Scheduling %d podcasts for update', podcasts.count()) # queue all those podcast updates for podcast in podcasts: # update_podcasts.delay() seems to block other task execution, # therefore celery.send_task() is used instead urls = [podcast.url] celery.send_task('mygpo.data.tasks.update_podcasts', args=[urls])