summaryrefslogtreecommitdiff
path: root/taskflow/examples
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2015-06-09 18:19:11 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2015-07-08 17:04:35 -0700
commit1e3dc09453e7e179fba613b61317ebad1556b77b (patch)
tree549d5110fc6f58a8b6de45651f80cff477e3fd91 /taskflow/examples
parentdf5fbe469c4c85c771bc0afcc5026d9790edc942 (diff)
downloadtaskflow-1e3dc09453e7e179fba613b61317ebad1556b77b.tar.gz
Rename logbook module -> models module
Since this module contains more than the logbook class and really is a our generic models that are used to hold the runtime structure it is more appropriate to place it under a models module and deprecate the usage of the old module by placing a warning there (so that when it is imported that warning is triggered). Change-Id: I79def5ee08f560d38f2c9dcefd0b33becc2a4d36
Diffstat (limited to 'taskflow/examples')
-rw-r--r--taskflow/examples/persistence_example.py4
-rw-r--r--taskflow/examples/tox_conductor.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/taskflow/examples/persistence_example.py b/taskflow/examples/persistence_example.py
index c911c2f..de9b427 100644
--- a/taskflow/examples/persistence_example.py
+++ b/taskflow/examples/persistence_example.py
@@ -31,7 +31,7 @@ sys.path.insert(0, self_dir)
from taskflow import engines
from taskflow.patterns import linear_flow as lf
-from taskflow.persistence import logbook
+from taskflow.persistence import models
from taskflow import task
from taskflow.utils import persistence_utils as p_utils
@@ -94,7 +94,7 @@ with eu.get_backend(backend_uri) as backend:
# Make a flow that will blow up if the file didn't exist previously, if it
# did exist, assume we won't blow up (and therefore this shows the undo
# and redo that a flow will go through).
- book = logbook.LogBook("my-test")
+ book = models.LogBook("my-test")
flow = make_flow(blowup=blowup)
eu.print_wrapped("Running")
try:
diff --git a/taskflow/examples/tox_conductor.py b/taskflow/examples/tox_conductor.py
index feff424..66e575b 100644
--- a/taskflow/examples/tox_conductor.py
+++ b/taskflow/examples/tox_conductor.py
@@ -42,7 +42,7 @@ from taskflow import engines
from taskflow.jobs import backends as boards
from taskflow.patterns import linear_flow
from taskflow.persistence import backends as persistence
-from taskflow.persistence import logbook
+from taskflow.persistence import models
from taskflow import task
from taskflow.utils import threading_utils
@@ -145,9 +145,9 @@ def generate_reviewer(client, saver, name=NAME):
def make_save_book(saver, review_id):
# Record what we want to happen (sometime in the future).
- book = logbook.LogBook("book_%s" % review_id)
- detail = logbook.FlowDetail("flow_%s" % review_id,
- uuidutils.generate_uuid())
+ book = models.LogBook("book_%s" % review_id)
+ detail = models.FlowDetail("flow_%s" % review_id,
+ uuidutils.generate_uuid())
book.add(detail)
# Associate the factory method we want to be called (in the future)
# with the book, so that the conductor will be able to call into