do not use Flask-SQLAlchemy from async tasks

This commit is contained in:
Kyle Mahan 2015-04-02 15:12:20 +00:00
parent 56b1485d21
commit 67c617e9dc
2 changed files with 2 additions and 1 deletions

View file

@ -114,7 +114,6 @@ class Feed(db.Model):
def get_or_create_push_secret(self):
if not self.push_secret:
self.push_secret = uuid.uuid4().hex
db.commit()
return self.push_secret
def __repr__(self):

View file

@ -210,6 +210,8 @@ def check_push_subscription(session, feed, response):
if hub and topic:
send_request('subscribe', hub, topic)
session.commit()
def notify_feed_updated(session, feed, entries):
"""Render the new entries and publish them to redis