diff --git a/doc/source/examples.rst b/doc/source/examples.rst index 64229f1b..187171fe 100644 --- a/doc/source/examples.rst +++ b/doc/source/examples.rst @@ -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 =========================== diff --git a/taskflow/examples/simple_linear_listening.py b/taskflow/examples/simple_linear_listening.py index deff63c7..850421b0 100644 --- a/taskflow/examples/simple_linear_listening.py +++ b/taskflow/examples/simple_linear_listening.py @@ -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()