Skip to content

How can I pass the parameter of callable to the Pub/Sub with python? #6787

@Adhders

Description

@Adhders
I want to use the Pub/Sub,  but I don't know how to pass the  parameter of callable function to the subscribe function, so that  the callable  function will be invoked automatically when a message is received on that channel.    (redis.__version__ == 3.3.11)

def subscribe(self, *args, **kwargs):
"""
Subscribe to channels. Channels supplied as keyword arguments expect
a channel name as the key and a callable as the value. A channel's
callable will be invoked automatically when a message is received on
that channel rather than producing a message via listen() or
get_message().
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions