aboutsummaryrefslogtreecommitdiff
path: root/manager.py
diff options
context:
space:
mode:
Diffstat (limited to 'manager.py')
-rwxr-xr-xmanager.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/manager.py b/manager.py
index e2dc863b..979f123e 100755
--- a/manager.py
+++ b/manager.py
@@ -1,6 +1,8 @@
#! /usr/bin/env python
# -*- coding: utf-8 -*-
+import asyncio
+
from bootstrap import application, db, populate_g
from flask.ext.script import Manager
from flask.ext.migrate import Migrate, MigrateCommand
@@ -55,10 +57,12 @@ def fetch_asyncio(user_id, feed_id):
except:
feed_id = None
+ loop = asyncio.get_event_loop()
for user in users:
if user.activation_key == "":
print("Fetching articles for " + user.nickname)
- feed_getter = crawler.retrieve_feed(user, feed_id)
+ feed_getter = crawler.retrieve_feed(loop, user, feed_id)
+ loop.close()
if __name__ == '__main__':
manager.run()
bgstack15