INNER CODE UNIT · Python

register_message_readers

yann-shi/Young · server.py:30

def register_message_readers():
    '''为nsq消息系统建立消费者'''

    handlers = {
        MessageTopic.CHAT_MESSAGE_NEW:
            chat_message_handler,

        MessageTopic.SEND_ACTIVATION_EMAIL:
            send_activation_email_handler,

        MessageTopic.SEND_RESET_PASSWORD_EMAIL:
            send_reset_password_email_handler,

        MessageTopic.SEND_HAS_UNREAD_MESSAGE_EMAIL:
            send_has_unread_message_email_handler,
    }

    for topic in MessageTopic.all_topic:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…