MCPcopy
hub / github.com/Bogdanp/dramatiq / message

Method message

dramatiq/actor.py:86–102  ·  view source on GitHub ↗

Build a message. This method is useful if you want to compose actors. See the actor composition documentation for details. Parameters: *args(tuple): Positional arguments to send to the actor. **kwargs: Keyword arguments to send to the actor. Ex

(self, *args: P.args, **kwargs: P.kwargs)

Source from the content-addressed store, hash-verified

84 self.broker.declare_actor(self)
85
86 def message(self, *args: P.args, **kwargs: P.kwargs) -> Message[R]:
87 """Build a message. This method is useful if you want to
88 compose actors. See the actor composition documentation for
89 details.
90
91 Parameters:
92 *args(tuple): Positional arguments to send to the actor.
93 **kwargs: Keyword arguments to send to the actor.
94
95 Examples:
96 >>> (add.message(1, 2) | add.message(3))
97 pipeline([add(1, 2), add(3)])
98
99 Returns:
100 Message: A message that can be enqueued on a broker.
101 """
102 return self.message_with_options(args=args, kwargs=kwargs)
103
104 def message_with_options(
105 self,

Calls 1

message_with_optionsMethod · 0.95