aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/crawler.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/crawler.py')
-rw-r--r--pyaggr3g470r/crawler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyaggr3g470r/crawler.py b/pyaggr3g470r/crawler.py
index cada119b..8052fb63 100644
--- a/pyaggr3g470r/crawler.py
+++ b/pyaggr3g470r/crawler.py
@@ -248,7 +248,9 @@ def retrieve_feed(user, feed_id=None):
tasks = [asyncio.ensure_future(init_process(user, feed)) for feed in feeds]
except:
tasks = [init_process(user, feed) for feed in feeds]
- loop.run_until_complete(asyncio.wait(tasks))
- loop.close()
+ try:
+ loop.run_until_complete(asyncio.wait(tasks))
+ finally:
+ loop.close()
logger.info("All articles retrieved. End of the processus.")
bgstack15