summaryrefslogtreecommitdiffstats
path: root/stator/graph.py
diff options
context:
space:
mode:
Diffstat (limited to 'stator/graph.py')
-rw-r--r--stator/graph.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/stator/graph.py b/stator/graph.py
index 424ea49..5c71d4a 100644
--- a/stator/graph.py
+++ b/stator/graph.py
@@ -87,10 +87,14 @@ class State:
try_interval: Optional[float] = None,
handler_name: Optional[str] = None,
externally_progressed: bool = False,
+ attempt_immediately: bool = True,
+ force_initial: bool = False,
):
self.try_interval = try_interval
self.handler_name = handler_name
self.externally_progressed = externally_progressed
+ self.attempt_immediately = attempt_immediately
+ self.force_initial = force_initial
self.parents: Set["State"] = set()
self.children: Set["State"] = set()
@@ -121,7 +125,7 @@ class State:
@property
def initial(self):
- return not self.parents
+ return self.force_initial or (not self.parents)
@property
def terminal(self):