Skip to content
Browse files

Updated documentation with quit_spade.

  • Loading branch information...
javipalanca committed Nov 4, 2019
1 parent 9a1bb6c commit 1bf0d3c94aaac247fcdfc7603052102d3a865e36
Showing with 26 additions and 0 deletions.
  1. +26 −0 docs/usage.rst
@@ -207,6 +207,32 @@ And the output of this example would be::
automatically killed and the exception will be stored as its ``exit_code``.

Finishing SPADE

There is a helper to quickly finish all the agents and behaviors running in your process. This helper function is

from spade import quit_spade

from spade import agent

class DummyAgent(agent.Agent):
async def setup(self):
print("Hello World! I'm agent {}".format(str(self.jid)))

dummy = DummyAgent("your_jid@your_xmpp_server", "your_password")



.. hint::
The ``quit_spade`` helper is not mandatory, but it helps to terminate all agents of the active container along with
their behaviors, as well as free all pending resources (threads, etc...).

Creating an agent from within another agent

0 comments on commit 1bf0d3c

Please sign in to comment.
You can’t perform that action at this time.