Remove less than useful action_engine __str__
The implementation of __str__ does not provide much useful information so instead just prefer the automatically provided one which provides equivalent information in a more well known format... Change-Id: I0a1683cfc22df1888a19f5af10d7a343462d3994
This commit is contained in:
committed by
Joshua Harlow
parent
99a0c72adc
commit
fce7afbd8d
@@ -136,14 +136,14 @@ For example, this is how you can use
|
||||
>>> with printing.PrintingListener(eng):
|
||||
... eng.run()
|
||||
...
|
||||
taskflow.engines.action_engine.engine.SerialActionEngine: ... has moved flow 'cat-dog' (...) into state 'RUNNING'
|
||||
taskflow.engines.action_engine.engine.SerialActionEngine: ... has moved task 'CatTalk' (...) into state 'RUNNING'
|
||||
<taskflow.engines.action_engine.engine.SerialActionEngine object at ...> has moved flow 'cat-dog' (...) into state 'RUNNING'
|
||||
<taskflow.engines.action_engine.engine.SerialActionEngine object at ...> has moved task 'CatTalk' (...) into state 'RUNNING'
|
||||
meow
|
||||
taskflow.engines.action_engine.engine.SerialActionEngine: ... has moved task 'CatTalk' (...) into state 'SUCCESS' with result 'cat' (failure=False)
|
||||
taskflow.engines.action_engine.engine.SerialActionEngine: ... has moved task 'DogTalk' (...) into state 'RUNNING'
|
||||
<taskflow.engines.action_engine.engine.SerialActionEngine object at ...> has moved task 'CatTalk' (...) into state 'SUCCESS' with result 'cat' (failure=False)
|
||||
<taskflow.engines.action_engine.engine.SerialActionEngine object at ...> has moved task 'DogTalk' (...) into state 'RUNNING'
|
||||
woof
|
||||
taskflow.engines.action_engine.engine.SerialActionEngine: ... has moved task 'DogTalk' (...) into state 'SUCCESS' with result 'dog' (failure=False)
|
||||
taskflow.engines.action_engine.engine.SerialActionEngine: ... has moved flow 'cat-dog' (...) into state 'SUCCESS'
|
||||
<taskflow.engines.action_engine.engine.SerialActionEngine object at ...> has moved task 'DogTalk' (...) into state 'SUCCESS' with result 'dog' (failure=False)
|
||||
<taskflow.engines.action_engine.engine.SerialActionEngine object at ...> has moved flow 'cat-dog' (...) into state 'SUCCESS'
|
||||
|
||||
Basic listener
|
||||
--------------
|
||||
|
||||
@@ -20,7 +20,6 @@ import threading
|
||||
|
||||
from concurrent import futures
|
||||
from oslo.utils import excutils
|
||||
from oslo.utils import reflection
|
||||
|
||||
from taskflow.engines.action_engine import compiler
|
||||
from taskflow.engines.action_engine import executor
|
||||
@@ -70,9 +69,6 @@ class ActionEngine(base.Engine):
|
||||
self._state_lock = threading.RLock()
|
||||
self._storage_ensured = False
|
||||
|
||||
def __str__(self):
|
||||
return "%s: %s" % (reflection.get_class_name(self), id(self))
|
||||
|
||||
def suspend(self):
|
||||
if not self._compiled:
|
||||
raise exc.InvalidState("Can not suspend an engine"
|
||||
|
||||
Reference in New Issue
Block a user