def _listen():
"""Ensures that we subscribe to new_event notifications on our
PostgreSQL connection.
"""
_logger.debug("registering event listener with PostgreSQL")
cursor = connection.cursor()
cursor.execute('LISTEN new_event')
评论列表
文章目录