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

Method declare_actor

dramatiq/broker.py:213–223  ·  view source on GitHub ↗

Declare a new actor on this broker. Declaring an Actor twice replaces the first actor with the second by name. Parameters: actor(Actor): The actor being declared.

(self, actor: Actor)

Source from the content-addressed store, hash-verified

211 raise NotImplementedError
212
213 def declare_actor(self, actor: Actor) -> None: # pragma: no cover
214 """Declare a new actor on this broker. Declaring an Actor
215 twice replaces the first actor with the second by name.
216
217 Parameters:
218 actor(Actor): The actor being declared.
219 """
220 self.emit_before("declare_actor", actor)
221 self.declare_queue(actor.queue_name)
222 self.actors[actor.actor_name] = actor
223 self.emit_after("declare_actor", actor)
224
225 def declare_queue(self, queue_name: str) -> None: # pragma: no cover
226 """Declare a queue on this broker. This method must be

Callers 1

__init__Method · 0.80

Calls 3

emit_beforeMethod · 0.95
declare_queueMethod · 0.95
emit_afterMethod · 0.95

Tested by

no test coverage detected