Merge "Add simple_linear_listening example to generated docs"

This commit is contained in:
Jenkins
2015-06-21 01:46:13 +00:00
committed by Gerrit Code Review
2 changed files with 14 additions and 2 deletions

View File

@@ -34,6 +34,18 @@ Using listeners
:linenos:
:lines: 16-
Using listeners (to watch a phone call)
=======================================
.. note::
Full source located at :example:`simple_linear_listening`.
.. literalinclude:: ../../taskflow/examples/simple_linear_listening.py
:language: python
:linenos:
:lines: 16-
Dumping a in-memory backend
===========================

View File

@@ -92,11 +92,11 @@ engine = taskflow.engines.load(flow, store={
})
# This is where we attach our callback functions to the 2 different
# notification objects that an engine exposes. The usage of a '*' (kleene star)
# notification objects that an engine exposes. The usage of a ANY (kleene star)
# here means that we want to be notified on all state changes, if you want to
# restrict to a specific state change, just register that instead.
engine.notifier.register(ANY, flow_watch)
engine.task_notifier.register(ANY, task_watch)
engine.atom_notifier.register(ANY, task_watch)
# And now run!
engine.run()