Commits

Stephen Tanner committed d136ec6

Investiage why DB insert does not work.

Comments (0)

Files changed (1)

 
             for link in new_links:
                 post = yield from self.build_post(link, sites[site])
-                ipdb.set_trace()  ######### Break Point ###########
                 posts.append(post)
 
         if posts:
             self.insert_posts(posts)
             self.email_posts(posts)
 
+        print("Number of new posts: " + len(posts))
+
+        return len(posts)
 
     #build post dict out of link and other data
     @asyncio.coroutine
         content = self.parse_post(page, site['post_class'])
         title = str(link.string)
         now = datetime.datetime.now().isoformat(' ')
-        post = {"url": href, "site": site, "title": title, "content": content, "short": short, "time_stamp": now}
-        ipdb.set_trace()  ######### Break Point ###########
+        return {"url": href, "site": site, "title": title, "content": content, "short": short, "time_stamp": now}
 
-        return post
+
 
 
     #Send myself a message with the titles paired with the shortend links