remove extra app context from fetch_reply_contexts

was causing detached state issues in previous commit
This commit is contained in:
Kyle Mahan 2016-03-04 08:53:15 -08:00
parent ddb75f5993
commit 4f11bb9f27

View file

@ -17,6 +17,7 @@ import requests
import rq
import sys
import time
import traceback
import urllib.parse
# normal update interval for polling feeds
@ -94,6 +95,8 @@ def tick():
q.enqueue(update_feed, feed.id)
def update_feed(feed_id, content=None,
content_type=None, is_polling=True):
@ -224,10 +227,6 @@ def update_feed(feed_id, content=None,
db.session.commit()
if new_entries:
for e in new_entries:
current_app.logger.debug('entry %s state: %s', e.uid, sqlalchemy.inspect(e))
notify_feed_updated(app, feed_id, new_entries)
@ -545,7 +544,6 @@ def hentry_to_entry(hentry, feed, backfill, now):
def fetch_reply_context(entry, in_reply_to, now):
with flask_app():
context = Entry.query\
.join(Entry.feed)\
.filter(Entry.permalink==in_reply_to, Feed.type == 'html')\