Пример #1
0
def download_feed(feed, feed_tag):
	new_subtask(len(feed) * 2)
	item_thread_pool = ThreadPool()
	for entry in feed.get_entries():
		increment_subtask()
	
		app_globals.STATS['items'] += 1

		if entry is None:
			app_globals.STATS['failed'] += 1
			error(" ** FAILED **")
			debug("(entry is None)")
			continue
		
		item = Item(entry, feed_tag)
		process_item(item, item_thread_pool)
		item_thread_pool.collect()
	item_thread_pool.collect_all()