From 2109e9c1e51afb4af1282a4e47f6dfd0f20f517a Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Wed, 16 Oct 2013 15:41:14 -0700 Subject: [PATCH] Add an introduction to explain resume_many example Change-Id: I162eff7b2988418f8dde9d89cd55c9095e72b40a --- taskflow/examples/resume_many_flows.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/taskflow/examples/resume_many_flows.py b/taskflow/examples/resume_many_flows.py index 8a7b3461..a3aa395f 100644 --- a/taskflow/examples/resume_many_flows.py +++ b/taskflow/examples/resume_many_flows.py @@ -21,6 +21,19 @@ import subprocess import sys import tempfile +# INTRO: In this example we create a common persistence database (sqlite based) +# and then we run a few set of processes which themselves use this persistence +# database, those processes 'crash' (in a simulated way) by exiting with a +# system error exception. After this occurs a few times we then activate a +# script which doesn't 'crash' and it will resume all the given engines flows +# that did not complete and run them to completion (instead of crashing). +# +# This shows how a set of tasks can be finished even after repeatingly being +# crashed, *crash resistance* if you may call it, due to the engine concept as +# well as the persistence layer which keeps track of the state a flow +# transitions through and persists the intermediary inputs and outputs and +# overall flow state. + def _exec(cmd, add_env=None): env = None