Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @gen.coroutine
- def _notify_posts(self, posts):
- """ Usa o broadcast para notificar os novos posts a todos os usuários
- que estão conectados ao canal público do feed. """
- self.log('posts to notify: %d' % len(posts))
- for post in reversed(posts):
- try:
- self.log('notifying...');
- yield self.backend.notify(post)
- self.log('notified!');
- except Exception, e:
- self.log('Não foi possível notificar o post %s. %s' % (post.id, str(e)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement