# Run by Heroku Scheduler every 10min from datetime import datetime, timedelta try: import sys sys.path.insert(0, '/Users/nick/dev/conversation') except: print "could not import -- must be running on heroku" from lib import postsdb postsdb.sort_posts(datetime.today())
# Run by Heroku Scheduler every 10min from datetime import datetime, timedelta try: import sys sys.path.insert(0, '/Users/nick/dev/theconversation') except: print "could not import -- must be running on heroku" from lib import postsdb postsdb.sort_posts(datetime.today())
def get(self): postsdb.sort_posts() self.redirect('/')
# Run by Heroku Scheduler every 10min from lib import postsdb postsdb.sort_posts()
def get(self): postsdb.sort_posts() self.set_secure_cookie('flash_success', "Posts were sorted" ) self.redirect('/admin')